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

Andy Parkins andyparkins
Tue Jan 31 11:36:57 CET 2006


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?


Andy
-- 
Dr Andy Parkins, M Eng (hons), AMIEE
andyparkins at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-patch-060131.diff
Type: text/x-diff
Size: 574 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060131/9248e2e1/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060131/9248e2e1/attachment.pgp>



More information about the ffmpeg-devel mailing list