avformat/mpeg: fix PCM-DVD mis-detection as MLP
authorPaul B Mahol <onemda@gmail.com>
Fri, 30 Mar 2018 14:06:55 +0000 (16:06 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 1 Apr 2018 18:43:54 +0000 (20:43 +0200)
Fixes #6563.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/mpeg.c

index abdc6a9..69d4a9d 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 || startcode == 0xa1) {
+        if (lpcm_header_len >= 6 && startcode == 0xa1) {
             codec_id = AV_CODEC_ID_MLP;
         } else {
             codec_id = AV_CODEC_ID_PCM_DVD;