[FFmpeg-cvslog] avformat/mpeg: fix PCM-DVD mis-detection as MLP

Paul B Mahol git at videolan.org
Sun Apr 1 21:55:03 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Mar 30 16:06:55 2018 +0200| [52e97814a18f62e4be7cc5d509ff9025f23ef2be] | committer: Paul B Mahol

avformat/mpeg: fix PCM-DVD mis-detection as MLP

Fixes #6563.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52e97814a18f62e4be7cc5d509ff9025f23ef2be
---

 libavformat/mpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index abdc6a937c..69d4a9d8ac 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 || startcode == 0xa1) {
+        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-cvslog mailing list