[FFmpeg-devel] [PATCH] close parser in av_find_stream_info is parsing is not needed

Michael Niedermayer michaelni
Wed May 19 23:22:25 CEST 2010

On Wed, May 19, 2010 at 02:06:18PM -0700, Baptiste Coudurier wrote:
> Hi Michael,
> On 05/18/2010 11:29 AM, Michael Niedermayer wrote:
>> On Tue, May 18, 2010 at 06:51:05AM -0700, Baptiste Coudurier wrote:
>>> On 5/18/10 5:58 AM, Michael Niedermayer wrote:
>>>> On Mon, May 17, 2010 at 01:17:42PM -0700, Baptiste Coudurier wrote:
>> We could implement the extraction with bitstream filters or anything else
>> but it would not affect the side effect we had unless i misremember.
>> Also whichever way does the extraction, must do so before actual decoding
>> that is we need to search the stream for the headers and then go back and
>> only once we have them start decoding from the begin.
>> This would implicate that it has to stay in av_find_stream_info() or 
>> another
>> thing run prior to actual decoding/demuxing.
>> The demuxing case results from us needing extradata at the begin for 
>> writing
>> the header for the -codec copy case.
> Well if stream header is not found before av_find_stream_info finishes, 
> there is no luck, but how frequently will this happen ? Extradata is 
> usually stream header and without them no decoding is possible.

> Also can the bistream filter buffer data itself ?

with the current API, no
it would be interrestng if the API was made more flexible, we might
one day even be able to implement AVParsers via such improved bsf api

>>> Anyway, in ffmpeg.c:
>>>                      int ticks= ist->st->parser ?
>>> ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
>>> This is no good for H264 in mkv, since parser is set but does not set
>>> repeat_pict. What do suggest ?
>> definitly, fix the parser
> Make the parser support the bistream in mov/mp4 ?


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100519/e3e35897/attachment.pgp>

More information about the ffmpeg-devel mailing list