vc1: stick to single precision
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 13 Aug 2014 20:16:05 +0000 (23:16 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 13 Aug 2014 20:22:43 +0000 (23:22 +0300)
(Note that CLOCK_FREQ has less than 24 significant bits)

modules/demux/vc1.c

index 69c8af6..1c671c4 100644 (file)
@@ -106,8 +106,8 @@ static int Open( vlc_object_t * p_this )
     p_sys->p_es        = NULL;
     p_sys->i_dts       = 0;
     p_sys->f_fps = var_CreateGetFloat( p_demux, "vc1-fps" );
-    if( p_sys->f_fps < 0.001 )
-        p_sys->f_fps = 0.0;
+    if( p_sys->f_fps < 0.001f )
+        p_sys->f_fps = 0.0f;
 
     /* Load the packetizer */
     es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_VC1 );
@@ -176,8 +176,8 @@ static int Demux( demux_t *p_demux)
                 p_sys->i_dts += CLOCK_FREQ *
                     p_sys->p_packetizer->fmt_out.video.i_frame_rate_base /
                     p_sys->p_packetizer->fmt_out.video.i_frame_rate;
-            else if( p_sys->f_fps > 0.001 )
-                p_sys->i_dts += (int64_t)((double) CLOCK_FREQ / p_sys->f_fps);
+            else if( p_sys->f_fps > 0.001f )
+                p_sys->i_dts += (int64_t)((float) CLOCK_FREQ / p_sys->f_fps);
             else
                 p_sys->i_dts += CLOCK_FREQ / 25;
         }