From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 971D340523 for ; Tue, 25 Jan 2022 07:26:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CAE0E68B0EE; Tue, 25 Jan 2022 09:26:45 +0200 (EET) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DFA8068AF45 for ; Tue, 25 Jan 2022 09:26:38 +0200 (EET) Received: from ea2f9051f9c337d4d13ad945a7d0ee7f ([1.152.188.127]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 20P7QRNI029852 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Tue, 25 Jan 2022 07:26:32 GMT Date: Tue, 25 Jan 2022 18:26:23 +1100 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: <9d94d5b772e7580d49a5fd084f38ec07feed8571.1643091105.git.pross@xvid.org> References: MIME-Version: 1.0 In-Reply-To: Subject: [FFmpeg-devel] [PATCH] avformat/img2dec: increase probe score for fourcc variants X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============3449202590070750462==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3449202590070750462== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TcE48tBalaK3WFfd" Content-Disposition: inline --TcE48tBalaK3WFfd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Signed-off-by: Peter Ross --- libavformat/img2dec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 2583ca2465..8608252d83 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1112,7 +1112,6 @@ static int photocd_probe(const AVProbeData *p) static int gem_probe(const AVProbeData *p) { const uint8_t *b =3D p->buf; - int ret =3D 0; if ( AV_RB16(b ) >=3D 1 && AV_RB16(b ) <=3D 3 && AV_RB16(b + 2) >=3D 8 && AV_RB16(b + 2) <=3D 779 && (AV_RB16(b + 4) > 0 && AV_RB16(b + 4) <=3D 32) && /* planes */ @@ -1121,13 +1120,13 @@ static int gem_probe(const AVProbeData *p) AV_RB16(b + 10) && AV_RB16(b + 12) && AV_RB16(b + 14)) { - ret =3D AVPROBE_SCORE_EXTENSION / 4; if (AV_RN32(b + 16) =3D=3D AV_RN32("STTT") || AV_RN32(b + 16) =3D=3D AV_RN32("TIMG") || AV_RN32(b + 16) =3D=3D AV_RN32("XIMG")) - ret +=3D 1; + return AVPROBE_SCORE_EXTENSION + 1; + return AVPROBE_SCORE_EXTENSION / 4; } - return ret; + return 0; } =20 #define IMAGEAUTO_DEMUXER_0(imgname, codecid) --=20 2.34.1 -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --TcE48tBalaK3WFfd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCYe+mGwAKCRBnYHnFrEDd a6IoAKCTi/wyw5CzSiipPVakbl+vhwOzMQCffhr0FJEb4eR2LGtw9rU/DooPwTU= =tHmt -----END PGP SIGNATURE----- --TcE48tBalaK3WFfd-- --===============3449202590070750462== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============3449202590070750462==--