[vlc-commits] vc1: stick to single precision

Rémi Denis-Courmont git at videolan.org
Wed Aug 13 22:23:09 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 13 23:16:05 2014 +0300| [a161bda654bcac72c90214c46c6e814643f12398] | committer: Rémi Denis-Courmont

vc1: stick to single precision

(Note that CLOCK_FREQ has less than 24 significant bits)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a161bda654bcac72c90214c46c6e814643f12398
---

 modules/demux/vc1.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/vc1.c b/modules/demux/vc1.c
index 69c8af6..1c671c4 100644
--- a/modules/demux/vc1.c
+++ b/modules/demux/vc1.c
@@ -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;
         }



More information about the vlc-commits mailing list