From 114e9864e14d8fcd44a7c6f5c7d302764d7607b5 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Tue, 4 Mar 2025 18:07:17 +0100 Subject: [PATCH] avcodec/sanm: ignore unknown codecs in FOBJs 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 Signed-off-by: Michael Niedermayer --- libavcodec/sanm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index c30095ed32..a4f0a28c7c 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -1274,7 +1274,8 @@ 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; + ctx->frame->flags |= AV_FRAME_FLAG_CORRUPT; + return 0; } }