changeset 23955:c4c4712cebae

make muxer store the provided timestamps
author michael
date Tue, 31 Jul 2007 17:24:53 +0000
parents 7d7f0c707be4
children a0d1fe96bdb8
files libmpdemux/muxer_lavf.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_lavf.c	Tue Jul 31 17:12:28 2007 +0000
+++ b/libmpdemux/muxer_lavf.c	Tue Jul 31 17:24:53 2007 +0000
@@ -280,10 +280,9 @@
 		pkt.flags |= PKT_FLAG_KEY;
 	else
 		pkt.flags = 0;
-	
-	
-	//pkt.pts = AV_NOPTS_VALUE; 
-	pkt.pts = (stream->timer / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
+
+	pkt.dts = (dts / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
+	pkt.pts = (pts / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
 //fprintf(stderr, "%Ld %Ld id:%d tb:%f %f\n", pkt.dts, pkt.pts, pkt.stream_index, av_q2d(priv->oc->streams[pkt.stream_index]->time_base), stream->timer);
 	
 	if(av_interleaved_write_frame(priv->oc, &pkt) != 0) //av_write_frame(priv->oc, &pkt)