diff mbox

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

Message ID 20180330141052.19258-1-onemda@gmail.com
State Accepted
Commit 52e97814a18f62e4be7cc5d509ff9025f23ef2be
Headers show

Commit Message

Paul B Mahol March 30, 2018, 2:10 p.m. UTC
Fixes #6563.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavformat/mpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer April 1, 2018, 5:32 p.m. UTC | #1
On Fri, Mar 30, 2018 at 04:10:52PM +0200, Paul B Mahol wrote:
> Fixes #6563.
> 
> Signed-off-by: Paul B Mahol <onemda@gmail.com>
> ---
>  libavformat/mpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

tested a bit, found no files this breaks.

thx

[...]
diff mbox

Patch

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;