changeset 25966:28316f2f8d26

Try to make fps float -> AVRational conversion work better. Might make sense to change this once we at least use double for fps everywhere.
author reimar
date Thu, 14 Feb 2008 17:38:52 +0000
parents 4cd12675cfbb
children 87331ea89425
files mencoder.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Thu Feb 14 14:50:34 2008 +0000
+++ b/mencoder.c	Thu Feb 14 17:38:52 2008 +0000
@@ -764,7 +764,8 @@
 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;
 }