[Ffmpeg-devel] [PATCH] libavformat/utils.c/truncate_ts shouldn't truncate AV_NOPTS_VALUE
Michael Niedermayer
michaelni
Wed Feb 1 16:03:34 CET 2006
Hi
On Tue, Jan 31, 2006 at 10:36:57AM +0000, Andy Parkins wrote:
> 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?
well, my original oppinion when messing with this and related code was that
the application has to provide a pts for every packet it wants to mux, this
should also explain the lack of AV_NOPTS_VALUE checking in truncate_ts()
allowing unknown pts/dts would need at least require some flags for each muxer
to specify if they support such unknown pts/dts (many do not)
[...]
--
Michael
More information about the ffmpeg-devel
mailing list