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 7EF95490EC for ; Mon, 3 Jun 2024 02:16:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C9F168D689; Mon, 3 Jun 2024 05:15:39 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1502068D67E for ; Mon, 3 Jun 2024 05:15:32 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 749BC40003 for ; Mon, 3 Jun 2024 02:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717380931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bM/t8n98hnvGXBuJcZd93ETvwUjkAo3/oENSGeH3vcY=; b=G6inJsjrmzrRc7Xhp7g4ecvRRjqsjbcn10ctaZWYLBCJCNLLJhsBUuVR0whEwCL3dBaoVY tmOHZ6514RzA9T0wxKNGEIKIUZbJBcU8hNRElE09HJZqtxb4YKeYFKGv0/rS3SMY3cneFj T4bG08rjmdqlx3vepo7MOaurXPCfDKrnyxVeC1oL1LKWgdPrq6ndkY5D67kRFimYWH6cmr OXHnrDyWTXfYLVEZ0zTlC99IPPLAWxzGnjCXqogaJUrM0SjzRSY2xStm8oJTWX3WzA+1sW BX4vLFJpqPaQlWCuTNewOJ7DP5vs/IApSQr45Bu/DQOIjZ0ZSZnnxS9XKwqpXw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 3 Jun 2024 04:15:22 +0200 Message-ID: <20240603021526.2372698-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240603021526.2372698-1-michael@niedermayer.cc> References: <20240603021526.2372698-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/9] avformat/img2dec: Little JFIF / Exif cleanup 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This changes the behavior and makes it behave how it probably was intended. Either way this is unlikely to result in any user visible change Fixes: CID1494637 Missing break in switch Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/img2dec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index f8c1c0f3136..ba523530745 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -795,11 +795,13 @@ static int jpeg_probe(const AVProbeData *p) state = EOI; break; case APP0: - if (AV_RL32(&b[i + 4]) == MKTAG('J','F','I','F')) + if (c == APP0 && AV_RL32(&b[i + 4]) == MKTAG('J','F','I','F')) got_header = 1; + /* fallthrough */ case APP1: - if (AV_RL32(&b[i + 4]) == MKTAG('E','x','i','f')) + if (c == APP1 && AV_RL32(&b[i + 4]) == MKTAG('E','x','i','f')) got_header = 1; + /* fallthrough */ case APP2: case APP3: case APP4: -- 2.45.1 _______________________________________________ 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".