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 7C2E64CA77 for ; Mon, 10 Feb 2025 20:48:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A16E268BE16; Mon, 10 Feb 2025 22:48:52 +0200 (EET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7396968B57B for ; Mon, 10 Feb 2025 22:48:46 +0200 (EET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2fa19e1d027so6056702a91.0 for ; Mon, 10 Feb 2025 12:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739220524; x=1739825324; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=z4O6UIM3euNYFksPP5jtAuJe540VIS7LVoAXBw2rOE4=; b=jn9fD4szT/ei5PtbCJO66d9FQTq3unCpRotGRFTdzK8zsDxhLyCVtx0jl+2vz45d3V RkkKx79u0QHXFMfeoO1ExeYXTk2rsd//5gOeE4ZJ0KQXUEf6jkFdgXfUdSdqhQ+d9RMo YRKyBGO4P3qMctGdZDZ9w+J9VNy+6N5HIkTtYulPxkNhLG7kLlIg3N21bmJ+v49mkndF pSROSNvTZtfiv7+6v6OzHa8RehhP90ZW9IUT+5heqvDKPfDul/Y9owCer5wMc+ZDrxvo uzbSTsoX4favn4meXDYedNFO5MmmbObnEY2oVI7EMUT51hkZ4bTfejq4hqt24RzCp0Ih mWxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739220524; x=1739825324; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z4O6UIM3euNYFksPP5jtAuJe540VIS7LVoAXBw2rOE4=; b=wMKaiA5npFgifgWoHi6PTQHCcVgW4tD1OjOBPLu3Ua72BYeKP/qakZ2yfrY1mYEPcA Kx0xmTvyqP2PYJvxNJxR3gbxf3+TXpxnWuSvbsNzJE1e7wtr2p92KlcMeRrlu6gJTQ00 ugIPVYH6E3pP3+ggsuNgrgToQkCtENt3Z3HBIsokYQKrQlyINS+2m6JGrnPr7I9yjVjS irbrlukbPYqc7HMAvKYgLI68MUxKILraqhzYJ5siCeS+qDfyXw91fXvOnfb2KEeRVoKi pPWAxGriSiSSOvYUTsNY/Qt6htr4GUoqtagdYS7hfctiBTWC+OkyHf0QO2U28A0TlnwR DlIg== X-Gm-Message-State: AOJu0YzL/1RJv4p/5wc5ap/UJwCIe+05aNwoUr8EAmPiFUueO9AIBlWm nHfYHGSn/fwA1P0dVOm9bzjMCvmuDJ+n3MWq84OQEh4oxSd2P5741qWTXEdtzM4MFiGHnGsGrAW 7biX7E1O36J+Nt+4tYOW4uAxJ+NcuXg== X-Gm-Gg: ASbGncuxv3DL0y/XtMXFW9wzhxUHl95B5t/u9zLL1vbHUpEqjiSLs0rg644yeJ09e3q CoUdg649ZmP+3XsEw/vuaF0sNubaDxqqBQM4SC7cMgqiKsqHD3Rii7eaXx2M6dN2TKlkzZxsIyL LYx/7zY2VRI1J7eR/DfDNaNBxd9U4= X-Google-Smtp-Source: AGHT+IEXPwCzKerjd1bW8vmu7EQ7dx+r19IipRdqQUKVQtcvEuHrT163/3soPTZVvA2dHlv3zEonhIhAM4d/ia1JN/c= X-Received: by 2002:a17:90b:4a86:b0:2f9:c144:9d13 with SMTP id 98e67ed59e1d1-2fa242e5dc0mr23293157a91.24.1739220524317; Mon, 10 Feb 2025 12:48:44 -0800 (PST) MIME-Version: 1.0 References: <20250210181247.144548-1-manuel.lauss@gmail.com> In-Reply-To: From: Manuel Lauss Date: Mon, 10 Feb 2025 21:48:32 +0100 X-Gm-Features: AWEUYZlCqsN12Z1gpNyMZaq_VN3ZvI7DQ0SGmK3bH6ayK7MVYNuTVmf6c0q7EJQ Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-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: Hi Marton! Marton Balint schrieb am Mo., 10. Feb. 2025, 20:42: > > > 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? Thats how the game engine works as well: A FRME can have >=0 FOBJs, all of them skippable based on game state. An unchanged image buffer from the previous FRME is absolutely posssible. So you should set AV_FRAME_FLAG_CORRUPT > flag in AVFrame->flags, and still log the error, not silently ignore it. > It's not corrupt per se. While working on codec 23, the other unsupported codecs in the test videos stop the decoding before getting to the c23 fobj. For a lot of Rebel Assault 2 videos this patch improves playback; nothing changes for the ones that were already supported by ffmpeg. 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". > _______________________________________________ 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".