[Ffmpeg-devel] mpeg4 avi, corrupted frames when CODEC_FLAG_TRUNCATED is set

Rich Felker dalias
Sat Oct 29 23:29:14 CEST 2005


On Sat, Oct 29, 2005 at 08:16:42PM +0200, Michael Niedermayer wrote:
> > > set AVFMT_FLAG_GENPTS, and if the code isnt buggy it should fill in the
> > > missing pts values
> > 
> > how extensive is this? does it work for all known out-of-order codecs
> > in avi?
> 
> it wont work with non trivial frame orderings in h264, but that could hardly
> be expected, frame type + dts isnt enough there to generate pts, it would
> require some changes to the h264 AVParser to either set the pts or to extract 
> some info about the ordering

i see.. :(
still, if it works for mpeg4 (asp) thats impressive!

> > another question many users have been asking: when using lavc to
> > decode frames, how do you copy the pts values from the input (coded)
> > frames to the output (decoded) frames? i know it can be done with an
> > ugly opaque data and get_buffer hack but surely there's a better
> > way..? i probably just don't know it.
> 
> send a patch which adds some muxer_pts field to AVCodecContext and AVFrame 
> maybe ...

ah.. opaque_pts would probably be a better name for it (pts not
touched by the decoder). of course now that i think of it maybe none
of this is necessary if you're not using the bad model where the
decoder delays frames to give an artificial one-in, one-out behavior.

rich





More information about the ffmpeg-devel mailing list