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

Andy Parkins andyparkins
Wed Feb 1 13:48:48 CET 2006


On Wednesday 2006 February 01 09:04, Wolfram Gloger wrote:

> 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).

I had a look at compute_pkt_fields2() and noticed that pkt->pts is only set to 
st->pts.val when we're not using B-frames.  So, I disabled B-frames and the 
problem that I was solving with my original patch has gone away.

The compute_pkt_fields2() code that runs when b_frames is set doesn't 
calculate a new PTS.  For all I know it's not meant to :-)  However, if 
compute_pkt_fields2() decides that pkt->pts should be left at AV_NOPTS_VALUE, 
then I think truncate_ts() should also leave it.  So I think my original 
patch is still a good idea.

Obviously, I'm just groping around in the dark here.  I haven't got a thorough 
enough understanding of this to be able to say anything for sure - so I hope 
I haven't just embarrassed myself in front of you all :-)



Andy

-- 
Dr Andy Parkins, M Eng (hons), AMIEE
andyparkins at gmail.com
-------------- 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/20060201/986b6199/attachment.pgp>



More information about the ffmpeg-devel mailing list