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

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 mpegtswritepacket() (et al) tests for pts being equal to AVNOPTSVALUE; however truncatets() has already masked pts. The fix was simply to stop truncatets from doing any truncation in the special case of the timestamp being AVNOPTSVALUE (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