[FFmpeg-devel] [PATCH] Speex parser
Michael Niedermayer
michaelni
Mon Sep 21 09:53:01 CEST 2009
On Sun, Sep 20, 2009 at 06:58:53PM -0700, Baptiste Coudurier wrote:
[...]
>>>> please correct below:
>>>> pts/dts: no
>>>> frame boundaries: no
>>>> start_time: ?
>>>> file duration: ?
>>>> packet duration: (pretty much meaningless without parsers)
>>>> stream array: yes
>>
>>>> extradata: (unreliable without parsers)
>>>
>>> Why is that? If a file header contains extradata, it should be
>>> returned, otherwise not. The ogg abomination is of course a special
>>> case.
>>
>> its because its convenient ...
>> some formats (mpeg4, aac, ...) can have their global headers in stream or
>> in a seperate field in the container
>> if now the parser extracts that stuff from in stream in
>> av_find_stream_info()
>> that has several advantages
>> 1. the decoder only has to look at extradata
>
> Extradata is sometimes a way to differentiate between bitstream formats,
> example are VC-1 and in some way H.264.
>
[...]
>
>> 3. when a file is cut and the global headers occur later,
>> av_find_stream_info()
>> will look ahead until these headers and put them in extradata. The
>> application will then have them available for the first frame even if
>> they
>> are stored after the first frame
>
> For which container is this happening ? global header is something usually
mpeg-ps/ts (mpeg4+h264+ (mpeg2 if its enabled again))
raw h264,mpeg4, (mpeg2 if its enabled again)
> put in header, and is put only once to avoid repeating it, ex mp4, wmv,
> mkv(?)
>
> I tend to agree with Mans here, av_find_stream_info should not populate
> extradata if it is not in the container.
this would cause us to loose a few seconds of video at the start in some
cases. I dont think any user would like that.
that said, i certainly can add a flag to disable extradata filling in
av_find_stream_info
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20090921/e8b96fa9/attachment.pgp>
More information about the ffmpeg-devel
mailing list