[MPlayer-cvslog] r25998 - trunk/mencoder.c

reimar subversion at mplayerhq.hu
Thu Feb 14 18:38:52 CET 2008


Author: reimar
Date: Thu Feb 14 18:38:52 2008
New Revision: 25998

Log:
Try to make fps float -> AVRational conversion work better.
Might make sense to change this once we at least use double for
fps everywhere.


Modified:
   trunk/mencoder.c

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	(original)
+++ trunk/mencoder.c	Thu Feb 14 18:38:52 2008
@@ -764,7 +764,8 @@ 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*playback_speed, 60000);
+    double fps = force_ofps?force_ofps:sh_video->fps*playback_speed;
+    AVRational q= av_d2q(fps, fps*1001+2);
     mux_v->h.dwScale= q.den;
     mux_v->h.dwRate = q.num;
 }



More information about the MPlayer-cvslog mailing list