[FFmpeg-cvslog] avcodec/sanm: ignore unknown codecs in FOBJs
Manuel Lauss
git at videolan.org
Sat Mar 8 21:57:16 EET 2025
ffmpeg | branch: master | Manuel Lauss <manuel.lauss at gmail.com> | Tue Mar 4 18:07:17 2025 +0100| [114e9864e14d8fcd44a7c6f5c7d302764d7607b5] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=114e9864e14d8fcd44a7c6f5c7d302764d7607b5
---
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;
}
}
More information about the ffmpeg-cvslog
mailing list