[FFmpeg-devel] [PATCH]Support more Atrac3-in-mkv samples

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Feb 10 09:17:52 CET 2013


Hi!

Attached patch allows to decode more atrac3 samples muxed with mkvmerge.
(For example if KingOfTheJailhouse.rm is used as input file.)

I will commit if nobody objects.

Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 1e54784..8d14fad 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -908,7 +908,8 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
                    avctx->channels, frame_factor);
             return AVERROR_INVALIDDATA;
         }
-    } else if (avctx->extradata_size == 10) {
+    } else if (avctx->extradata_size == 12 ||
+               avctx->extradata_size == 10) {
         /* Parse the extradata, RM format. */
         version                = bytestream_get_be32(&edata_ptr);
         samples_per_frame      = bytestream_get_be16(&edata_ptr);


More information about the ffmpeg-devel mailing list