[Ffmpeg-devel] [PATCH] libavformat/utils.c/truncate_ts shouldn't truncate AV_NOPTS_VALUE

Måns Rullgård mru
Tue Jan 31 11:49:06 CET 2006

Andy Parkins said:
> Hello,
> I was getting strange behaviour where the PTS of an encoded stream was
> discontinuous and cyclic.  I was using an MPEGTS container for MPEG4 video
> (although I don't think that matters).  The problem, I think, is that
> mpegts_write_packet() (et al) tests for pts being equal to AV_NOPTS_VALUE;
> however truncate_ts() has already masked pts.
> The fix was simply to stop truncate_ts from doing any truncation in the
> special case of the timestamp being AV_NOPTS_VALUE (for both pts and dts)
> It's certainly fixed my problem, is there any reason I shouldn't do this?

It seems correct to me.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list