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

Wolfram Gloger wmglo
Wed Feb 1 10:04:48 CET 2006


Hi,

> The problem, I think, is that=20
> mpegts_write_packet() (et al) tests for pts being equal to AV_NOPTS_VALUE;=
> =20
> however truncate_ts() has already masked pts.
> 
> The fix was simply to stop truncate_ts from doing any truncation in the=20
> 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 would be interesting to see the call trace where truncate_ts()
does indeed mask an AV_NOPTS_VALUE timestamp..

>From a brief look at utils.c, it seems to me like
compute_pkt_fields2() should already have run on all the packets
coming into truncate_ts(), and that the timestamps should therefore be
valid (unless st->pts.val would be AV_NOPTS_VALUE which I don't think
is allowed on an output stream).

Regards,
Wolfram.





More information about the ffmpeg-devel mailing list