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 ESMTPS id E7D594CA65 for ; Mon, 10 Feb 2025 19:41:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 914BA68BF7F; Mon, 10 Feb 2025 21:41:55 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A06368BE9F for ; Mon, 10 Feb 2025 21:41:49 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 97D21EB829 for ; Mon, 10 Feb 2025 20:42:39 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PjqnLy3oVXzf for ; Mon, 10 Feb 2025 20:42:37 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 60D23EB512 for ; Mon, 10 Feb 2025 20:42:37 +0100 (CET) Date: Mon, 10 Feb 2025 20:42:37 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20250210181247.144548-1-manuel.lauss@gmail.com> Message-ID: References: <20250210181247.144548-1-manuel.lauss@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/3] avcodec/sanm: ignore unknown codecs in FOBJs 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 10 Feb 2025, Manuel Lauss wrote: > Don't error out, just ignore unknown codec numbers and pretend > decode succeeded. This is useful for older LucasArts titles > which stack a lot of different FOBJs with different codecs into > a single frame. > > Signed-off-by: Manuel Lauss > --- > libavcodec/sanm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c > index c30095ed32..37d2c915d4 100644 > --- a/libavcodec/sanm.c > +++ b/libavcodec/sanm.c > @@ -1274,7 +1274,7 @@ static int process_frame_obj(SANMVideoContext *ctx) > return old_codec48(ctx, w, h); > default: > avpriv_request_sample(ctx->avctx, "Subcodec %d", codec); > - return AVERROR_PATCHWELCOME; > + return 0; But if there is an unsupported FOBJ code that means that the frame might be only partially decoded, right? So you should set AV_FRAME_FLAG_CORRUPT flag in AVFrame->flags, and still log the error, not silently ignore it. Regards, Marton > } > } > > -- > 2.48.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". > _______________________________________________ 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".