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

Rich Felker dalias
Sat Oct 29 19:56:50 CEST 2005


On Sat, Oct 29, 2005 at 07:15:54PM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Wed, Oct 26, 2005 at 12:10:29PM -0400, Rich Felker wrote:
> > On Wed, Oct 26, 2005 at 01:03:48PM +0200, Michael Niedermayer wrote:
> > > Hi
> > > 
> > > On Tue, Oct 25, 2005 at 07:07:09AM +0200, Stefan Lucke wrote:
> > > > On Samstag, 22. Oktober 2005 00:42, Stefan Lucke wrote:
> > > > > On Freitag, 21. Oktober 2005 11:45, Stefan Lucke wrote:
> > > > 
> > > > > > I'll do some tests when I'm back home.
> > > > > 
> > > > > Done. The internal framer seems to be ok. But the number of consumed
> > > > > byte is not. I changed the test sequence of get_consumed_bytes()
> > > > > to first check CODEC_FLAG_TRUNCATED and than s->divx_packed.
> > > > > By that this stream plays fine with and without CODEC_FLAG_TRUNCATED.
> > > > > See attached diff.
> > > > > 
> > > > 
> > > > No other comment from ffmpeg developer on that patch ?
> > > 
> > > rejected, dont use CODEC_FLAG_TRUNCATED, use a AVParser
> > 
> > hey michael,
> > 
> > on a related issue, is there any example/doc on how to use lavf/lavc
> > to demux to a sequence of packets will full pts info? it's a common
> > question on here it seems, and i think a lot of powerful stuff has
> > been added to lavf/lavc to overcome the problems, but i don't know
> > anything about it so i can't tell people who ask for help what to do,
> > except for telling them it's a very difficult problem.
> 
> 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?

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.

rich





More information about the ffmpeg-devel mailing list