]> git.sesse.net Git - vlc/commitdiff
reintroduce nearbyint, but use the 1001 multiplier. adding 0.5 wasn't transforming...
authorMark Moriarty <markfm@videolan.org>
Tue, 22 Mar 2005 13:29:30 +0000 (13:29 +0000)
committerMark Moriarty <markfm@videolan.org>
Tue, 22 Mar 2005 13:29:30 +0000 (13:29 +0000)
modules/stream_out/transcode.c

index 94ff35a2f77c43a8ed1eb83f645905026b3d86c2..b0a0faa9e8f05962023a6112f5dffb1760bde18d 100644 (file)
@@ -27,6 +27,7 @@
  *****************************************************************************/
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 
 #include <vlc/vlc.h>
 #include <vlc/input.h>
@@ -672,7 +673,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
         if( p_sys->f_fps > 0 )
         {
             id->p_encoder->fmt_out.video.i_frame_rate =
-                p_sys->f_fps * 1001 + 0.5;
+                nearbyint(p_sys->f_fps * 1001);
             id->p_encoder->fmt_out.video.i_frame_rate_base = 1001;
         }
     }