[Ffmpeg-devel] Problem in av_find_stream_info()

Michael Niedermayer michaelni
Sun Jul 30 21:51:22 CEST 2006


On Sun, Jul 30, 2006 at 11:00:20PM +0800, ?????? wrote:
> Hi,
> I think there is a bug in av_find_stream_info(), when processing a file with 
> AVFMTCTX_NOHEADER flag, typically FLV files, the function will trying to read 
> the entire file into the memory since the only way to get out of the loop is 
> an EOF or AVERROR_NOMEM. MAX_READ_SIZE has no effect when all the stream info 
> exist with an AVFMTCTX_NOHEADER flag. This behavior was introduced in 2494.

and no IMO its no bug to ignore MAX_READ_SIZE if some packets could be decoded
stopping based on duration is better as its independant of the bitrate which
could vary very widely between files

> BTW, since FLV only have one video stream and one audio stream, could 
> something like AVFMTCTX_FLVHEADER be introduce to make the 
> av_find_stream_info() return when two stream has been found, So the playback 
> can start instantly?

ive no objections to a AVFMT_2STREAMS flag in AVInputFormat
furthermore ive no objections to make the various limits (MAX_STREAM_DURATION
, ...) user settable


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list