[FFmpeg-devel] Command-lineparameters usedtoo latefor has_codec_parameters()

Luca Abeni lucabe72
Fri Jan 16 15:46:10 CET 2009

> OK, just checked: indeed, ff_h263_decode_init() immediately sets the 
> pix_fmt (to yuv420p by default). But the problem is that 
> ff_h263_decode_init() is only called on the first try_decode_frame(), 
> which itself is triggered by the FALSE returned from has_codec_parameters().
> So it seems we have a chicken-and-egg issue: we decide that 
> bitstream-based guessing is due based on the absence of some parameters, 
> *then* we get these parameters from codec init (after reading just 1 
> frame), *then* we wait for a full GOP for no reason... Strange, eh ?

If av_find_stream_info() is waiting for a whole GOP, then I doubt the
problem is in pix_fmt: if the problem was "pix_fmt == PIX_FMT_NONE", then
has_codec_parameters() would have been true after reading the first frame
(I think), so av_find_stream_info() would have not read a whole GOP.
I suspect the problem is in the width&height or in the time_base.


More information about the ffmpeg-devel mailing list