[FFmpeg-devel] [PATCH] When PMT is found, we have found mpegts header information

Baptiste Coudurier baptiste.coudurier
Fri Apr 16 22:41:08 CEST 2010

On 04/16/2010 01:33 PM, elupus wrote:
> On Fri, 16 Apr 2010 12:49:18 -0700, Baptiste Coudurier wrote:
>> On 04/15/2010 08:34 AM, Joakim Plate wrote:
>> [0 quoted lines suppressed]
>> Yes, as soon as you got the PMT referred by the PAT it is closed, but
> the PAT filter is kept open and will relaunch the PMT filter if PMT pid
> changes.
> Ah missed that.
>> [0 quoted lines suppressed]
>> Does probesize reduce start time ? That's the way to go IMHO.
> The problem with that is that we want the minimum start time always. So
> we'd have to set probe size to a few bytes, see if it works, retry with a
> larger size and so on.

I'm sure a smaller probesize would be reasonable and would work in most 
of the cases.

> Why is it better to find many PMT's during av_find_stream_info compared to
> later in the stream? One could suppose to put it dependent on is_streamed
> in the bytecontext. But then we start splitting hairs.
> In any case, I won't push the matter anymore, i'll just keep the patch in
> our repo.

AVFMT_NOHEADER is handled in av_find_stream_info, and this process is 
stopped by probesize.
AVFMT_NOHEADER is here to inform the user that new streams can be added 
later on.
PMT is not found during av_find_stream_info specifically, it is found 
during the demuxing.
av_find_stream_info keeps reading some packets until probesize is 
reached to detect as many streams as possible, due to AVFMT_NOHEADER.
If you remove AVFMT_NOHEADER, there is a great chance some streams will 
be missed.

I hope it's more clear now.

Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org

More information about the ffmpeg-devel mailing list