diff mbox

[FFmpeg-devel] lavf/mpegts: Consider 0x0f just a hint towards aac

Message ID CAB0OVGpA20eKzEw5TLJggo8f2grtXYg5xhW3v3xsj7uzCgJThw@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Sept. 13, 2017, 5:12 p.m. UTC
Hi!

Attached patch fixes ticket #6657.

Please comment, Carl Eugen

Comments

Michael Niedermayer Sept. 14, 2017, 9:48 p.m. UTC | #1
On Wed, Sep 13, 2017 at 07:12:17PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes ticket #6657.
> 
> Please comment, Carl Eugen

>  mpegts.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 370a433251f563e16b654eeca8bb3463e787fd61  0001-lavf-mpegts-Consider-stream_type-0x0f-just-a-hint-to.patch
> From d806a243e97de8c245958dc6f8d2646217cc5105 Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> Date: Wed, 13 Sep 2017 19:05:10 +0200
> Subject: [PATCH] lavf/mpegts: Consider stream_type 0x0f just a hint toward
>  AAC.
> 
> It is also used in the wild to signal latm.
> 
> Fixes ticket #6657.
> ---
>  libavformat/mpegts.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

should be ok unless this causes common streams to be slowed down
in a non trivial way in terms of data/time needed for detection

also please add a fate test, if the file is not too large

[...]
Carl Eugen Hoyos Sept. 14, 2017, 10:13 p.m. UTC | #2
2017-09-14 23:48 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:

> also please add a fate test, if the file is not too large

Are 100000 bytes ok?
The alternative is to simply mux any latm sample into mpegts
with patched FFmpeg to force id 0x0f.

Carl Eugen
Michael Niedermayer Sept. 15, 2017, 12:18 a.m. UTC | #3
On Fri, Sep 15, 2017 at 12:13:56AM +0200, Carl Eugen Hoyos wrote:
> 2017-09-14 23:48 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> 
> > also please add a fate test, if the file is not too large
> 
> Are 100000 bytes ok?

with mpeg-ts, i think its ok


> The alternative is to simply mux any latm sample into mpegts
> with patched FFmpeg to force id 0x0f.
> 
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Carl Eugen Hoyos Sept. 20, 2017, 12:24 a.m. UTC | #4
2017-09-14 23:48 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Wed, Sep 13, 2017 at 07:12:17PM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes ticket #6657.
>>
>> Please comment, Carl Eugen
>
>>  mpegts.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 370a433251f563e16b654eeca8bb3463e787fd61  0001-lavf-mpegts-Consider-stream_type-0x0f-just-a-hint-to.patch
>> From d806a243e97de8c245958dc6f8d2646217cc5105 Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
>> Date: Wed, 13 Sep 2017 19:05:10 +0200
>> Subject: [PATCH] lavf/mpegts: Consider stream_type 0x0f just a hint toward
>>  AAC.
>>
>> It is also used in the wild to signal latm.
>>
>> Fixes ticket #6657.
>> ---
>>  libavformat/mpegts.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> should be ok unless this causes common streams to be slowed down
> in a non trivial way in terms of data/time needed for detection

I cannot reproduce this, pushed.

> also please add a fate test, if the file is not too large

Will do.
File loewe.ts uploaded to my home directory on ffbox.

Thank you, Carl Eugen
Michael Niedermayer Sept. 20, 2017, 11:19 p.m. UTC | #5
On Wed, Sep 20, 2017 at 02:24:35AM +0200, Carl Eugen Hoyos wrote:
> 2017-09-14 23:48 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> > On Wed, Sep 13, 2017 at 07:12:17PM +0200, Carl Eugen Hoyos wrote:
> >> Hi!
> >>
> >> Attached patch fixes ticket #6657.
> >>
> >> Please comment, Carl Eugen
> >
> >>  mpegts.c |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 370a433251f563e16b654eeca8bb3463e787fd61  0001-lavf-mpegts-Consider-stream_type-0x0f-just-a-hint-to.patch
> >> From d806a243e97de8c245958dc6f8d2646217cc5105 Mon Sep 17 00:00:00 2001
> >> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> >> Date: Wed, 13 Sep 2017 19:05:10 +0200
> >> Subject: [PATCH] lavf/mpegts: Consider stream_type 0x0f just a hint toward
> >>  AAC.
> >>
> >> It is also used in the wild to signal latm.
> >>
> >> Fixes ticket #6657.
> >> ---
> >>  libavformat/mpegts.c |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > should be ok unless this causes common streams to be slowed down
> > in a non trivial way in terms of data/time needed for detection
> 
> I cannot reproduce this, pushed.
> 
> > also please add a fate test, if the file is not too large
> 

> Will do.
> File loewe.ts uploaded to my home directory on ffbox.

uploaded

thx

[...]
diff mbox

Patch

From d806a243e97de8c245958dc6f8d2646217cc5105 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 13 Sep 2017 19:05:10 +0200
Subject: [PATCH] lavf/mpegts: Consider stream_type 0x0f just a hint toward
 AAC.

It is also used in the wild to signal latm.

Fixes ticket #6657.
---
 libavformat/mpegts.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 4d2f5c6..53cbcfb 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -814,7 +814,7 @@  static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
     st->codecpar->codec_tag = pes->stream_type;
 
     mpegts_find_stream_type(st, pes->stream_type, ISO_types);
-    if (pes->stream_type == 4)
+    if (pes->stream_type == 4 || pes->stream_type == 0x0f)
         st->request_probe = 50;
     if ((prog_reg_desc == AV_RL32("HDMV") ||
          prog_reg_desc == AV_RL32("HDPR")) &&
-- 
1.7.10.4