changeset 11946:73b7ddcf4cbe

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
author michael
date Tue, 10 Feb 2004 14:12:26 +0000
parents 6363be1eb800
children 3ccd5dcf447c
files mencoder.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mencoder.c	Tue Feb 10 07:14:46 2004 +0000
+++ b/mencoder.c	Tue Feb 10 14:12:26 2004 +0000
@@ -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;