[FFmpeg-devel] [PATCH]lavf/mpeg: Identify sub-stream ID 0xa1 as mlp

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Mar 3 11:26:20 CET 2016


Hi!

Attached patch (still) fixes ticket #4786 for me.
Autodetection seems impossible to me and the following 
page suggests that this patch is likely correct:
http://dvd-audio.sourceforge.net/spec/aob.shtml

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 787d5f0..2f48459 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -568,7 +568,7 @@ redo:
         codec_id = AV_CODEC_ID_DTS;
     } else if (startcode >= 0xa0 && startcode <= 0xaf) {
         type     = AVMEDIA_TYPE_AUDIO;
-        if (lpcm_header_len == 6) {
+        if (lpcm_header_len == 6 || startcode == 0xa1) {
             codec_id = AV_CODEC_ID_MLP;
         } else {
             codec_id = AV_CODEC_ID_PCM_DVD;


More information about the ffmpeg-devel mailing list