[FFmpeg-devel] flv decoder question
Michael Niedermayer
michaelni
Sun Jul 26 22:15:18 CEST 2009
On Sun, Jul 26, 2009 at 02:52:09PM -0400, Justin Ruggles wrote:
> Reimar D?ffinger wrote:
> > On Sat, Jul 25, 2009 at 06:43:02PM -0700, Baptiste Coudurier wrote:
> >> On 07/25/2009 05:41 PM, Justin Ruggles wrote:
> >>> Can someone who knows about the FLV decoder explain these lines in
> >>> flv_read_header()?
> >>>
> >>> if((flags& (FLV_HEADER_FLAG_HASVIDEO|FLV_HEADER_FLAG_HASAUDIO))
> >>> != (FLV_HEADER_FLAG_HASVIDEO|FLV_HEADER_FLAG_HASAUDIO))
> >>> s->ctx_flags |= AVFMTCTX_NOHEADER;
> >>>
> >>> I ask because it is causing av_find_stream_info() to read way more data
> >>> than necessary for audio-only FLV files containing Speex.
> >> The idea is to read packets to create streams if flags is wrongly set,
> >> but the check will cause NOHEADER to be always be set audio only or
> >> video only files.
> >
> > I think this is intentional, since IIRC there are files with audio and video
> > where the header still indicates only one of them.
>
> Ok, well I guess that's the price of supporting broken files... I was
> just curious.
the stuff could maybe use a check based on strict_std_compliance so the
user could avoid the delay if he knows his files are standard compliant that
is have the flags set correctly
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- 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/20090726/2b989923/attachment.pgp>
More information about the ffmpeg-devel
mailing list