aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@gmail.com>2025-03-04 18:07:17 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2025-03-08 20:55:37 +0100
commit114e9864e14d8fcd44a7c6f5c7d302764d7607b5 (patch)
treeb0fc1acdbe5285ea2c4b42e1525f2cf65d48043d
parentf641c6846ac419284ae73948b617a250b1a3c22d (diff)
downloadffmpeg-114e9864e14d8fcd44a7c6f5c7d302764d7607b5.tar.gz
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 <manuel.lauss@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/sanm.c3
1 files changed, 2 insertions, 1 deletions
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;
}
}