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 9B33D455CE for ; Thu, 9 Mar 2023 12:57:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF20168BD13; Thu, 9 Mar 2023 14:57:28 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2085968BAA5 for ; Thu, 9 Mar 2023 14:57:21 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 77BFDFF80B for ; Thu, 9 Mar 2023 12:57:20 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 9 Mar 2023 13:57:16 +0100 Message-Id: <20230309125717.29821-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230309125717.29821-1-michael@niedermayer.cc> References: <20230309125717.29821-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/lcldec: 420 seems missing 2 bytes, ignore that 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 MIME-Version: 1.0 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: Fixes: Ticket 10238 Fixes: mszh_306_306_yuv420.avi Signed-off-by: Michael Niedermayer --- libavcodec/lcldec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 0196460eb2..f9a0755e4d 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -219,7 +219,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, if (c->decomp_size != mszh_dlen) { av_log(avctx, AV_LOG_ERROR, "Decoded size differs (%d != %d)\n", c->decomp_size, mszh_dlen); - return AVERROR_INVALIDDATA; + if (c->decomp_size != mszh_dlen && + c->decomp_size != mszh_dlen + 2) // YUV420 306x306 is missing 2 bytes + return AVERROR_INVALIDDATA; } encoded = c->decomp_buf; len = mszh_dlen; -- 2.17.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".