lavf/mpeg: Identify sub-stream ID 0xa1 as mlp.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 9 Mar 2016 13:12:18 +0000 (14:12 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 9 Mar 2016 13:12:18 +0000 (14:12 +0100)
Fixes ticket #4786.
Auto-detection seems difficult, patch mostly confirmed by
http://dvd-audio.sourceforge.net/spec/aob.shtml

libavformat/mpeg.c

index a7ceeaf..77d5cd1 100644 (file)
@@ -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;