[MPlayer-cvslog] CVS: main/libmpdemux muxer_lavf.c,1.6,1.7

Michael Niedermayer CVS syncmail at mplayerhq.hu
Sun May 1 13:13:16 CEST 2005


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv17909

Modified Files:
	muxer_lavf.c 
Log Message:
fix timestamps


Index: muxer_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- muxer_lavf.c	1 May 2005 05:11:02 -0000	1.6
+++ muxer_lavf.c	1 May 2005 11:13:14 -0000	1.7
@@ -213,7 +213,12 @@
 	
 	
 	//pkt.pts = AV_NOPTS_VALUE; 
+#if LIBAVFORMAT_BUILD >= 4624
+	pkt.pts = (stream->timer / av_q2d(priv->oc->streams[pkt.stream_index]->time_base) + 0.5);
+#else
 	pkt.pts = AV_TIME_BASE * stream->timer;
+#endif
+//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)
 	{




More information about the MPlayer-cvslog mailing list