# HG changeset patch # User reimar # Date 1203010732 0 # Node ID 28316f2f8d266f1ac3a3cead8753e04bd8347f8c # Parent 4cd12675cfbb30415b4d1d202489f269769749ed Try to make fps float -> AVRational conversion work better. Might make sense to change this once we at least use double for fps everywhere. diff -r 4cd12675cfbb -r 28316f2f8d26 mencoder.c --- 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; }