diff mbox

[FFmpeg-devel] invalid PCM-DVD detection

Message ID 6af11568-1f52-0eb4-e8e1-239770a415b3@obninsk.ru
State New
Headers show

Commit Message

Evgeny Nov. 16, 2018, 4:41 p.m. UTC

Comments

Paul B Mahol Nov. 16, 2018, 4:46 p.m. UTC | #1
On 11/16/18, Евгений <kea@obninsk.ru> wrote:
>
>

Do you have sample(s) this patch fixes?

There is sample on trac that needs current code in master.
Hendrik Leppkes Nov. 16, 2018, 4:56 p.m. UTC | #2
On Fri, Nov 16, 2018 at 5:41 PM Евгений <kea@obninsk.ru> wrote:
>
>

This is basically a revert of
52e97814a18f62e4be7cc5d509ff9025f23ef2be, which fixed other samples
being misdetected.
So instead of flipping it back and forth with no real conclusion,
maybe some smarter code would be needed here.

- Hendrik
Paul B Mahol Nov. 16, 2018, 5:10 p.m. UTC | #3
On 11/16/18, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
> On Fri, Nov 16, 2018 at 5:41 PM Евгений <kea@obninsk.ru> wrote:
>>
>>
>
> This is basically a revert of
> 52e97814a18f62e4be7cc5d509ff9025f23ef2be, which fixed other samples
> being misdetected.
> So instead of flipping it back and forth with no real conclusion,
> maybe some smarter code would be needed here.

It is not revert, previous code used || .
Carl Eugen Hoyos Nov. 16, 2018, 9:45 p.m. UTC | #4
2018-11-16 17:41 GMT+01:00, Евгений <kea@obninsk.ru>:

This patch also contains two tabs that cannot be committed
to our repository.

Please provide your sample, Carl Eugen
Michael Niedermayer Nov. 18, 2018, 6:34 p.m. UTC | #5
On Fri, Nov 16, 2018 at 07:41:27PM +0300, Евгений wrote:
> 

>  mpeg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 10489d03a741445401f3f6bfb49e536680db6cc9  0003-invalid-PCM-DVD-detection.patch
> From 8dffee21a78c17bf1e74f459869babe77041dfd2 Mon Sep 17 00:00:00 2001
> From: Evgeny <kea@obninsk.ru>
> Date: Fri, 16 Nov 2018 12:38:01 +0300

> Subject: [PATCH 3/6] invalid PCM-DVD detection

This commit message is too terse, it should refer to the
sample and or some reference information

[...]
diff mbox

Patch

From 8dffee21a78c17bf1e74f459869babe77041dfd2 Mon Sep 17 00:00:00 2001
From: Evgeny <kea@obninsk.ru>
Date: Fri, 16 Nov 2018 12:38:01 +0300
Subject: [PATCH 3/6] invalid PCM-DVD detection

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

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index d4369b4..4ec40d6 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -591,7 +591,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;
-- 
2.1.4