[Mplayer-cvslog] CVS: main mencoder.c,1.232,1.233

Michael Niedermayer CVS syncmail at mplayerhq.hu
Tue Feb 10 15:12:29 CET 2004


CVS change done by Michael Niedermayer CVS

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

Modified Files:
	mencoder.c 
Log Message:
use libavcodecs float -> fraction conversation if available for -ofps, that way exact framerates like 24000/1001 are possible instead of ending up with x/10000 


Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -r1.232 -r1.233
--- mencoder.c	29 Jan 2004 12:01:25 -0000	1.232
+++ mencoder.c	10 Feb 2004 14:12:26 -0000	1.233
@@ -627,8 +627,16 @@
 mux_v->source=sh_video;
 
 mux_v->h.dwSampleSize=0; // VBR
+#ifdef USE_LIBAVCODEC
+{
+    AVRational q= av_d2q(force_ofps?force_ofps:sh_video->fps, 30000); 
+    mux_v->h.dwScale= q.den;
+    mux_v->h.dwRate = q.num;
+}
+#else
 mux_v->h.dwScale=10000;
 mux_v->h.dwRate=mux_v->h.dwScale*(force_ofps?force_ofps:sh_video->fps);
+#endif
 
 mux_v->codec=out_video_codec;
 




More information about the MPlayer-cvslog mailing list