[vlc-commits] oldmovie: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

Steve Lhomme git at videolan.org
Fri Jul 6 16:07:12 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 14 09:16:00 2018 +0200| [8b87b182ed60ccbe069f17fc7cee06b4f09c00c8] | committer: Steve Lhomme

oldmovie: convert vlc_tick_t to seconds explicitly using SEC_FROM_VLC_TICK()

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

 modules/video_filter/oldmovie.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/video_filter/oldmovie.c b/modules/video_filter/oldmovie.c
index 7fbff857de..eb418b869e 100644
--- a/modules/video_filter/oldmovie.c
+++ b/modules/video_filter/oldmovie.c
@@ -460,7 +460,7 @@ static int oldmovie_sliding_offset_effect( filter_t *p_filter, picture_t *p_pic_
         /* check if offset is close to 0 and then ready to stop */
         if ( abs( p_sys->i_sliding_ofs ) < abs( p_sys->i_sliding_speed
              * p_sys->i_height[Y_PLANE]
-             * ( p_sys->i_cur_time - p_sys->i_last_time ) / CLOCK_FREQ )
+             * SEC_FROM_VLC_TICK( p_sys->i_cur_time - p_sys->i_last_time ) )
              ||  abs( p_sys->i_sliding_ofs ) < p_sys->i_height[Y_PLANE] * 100 / 20 ) {
 
             /* reset sliding parameters */
@@ -471,8 +471,7 @@ static int oldmovie_sliding_offset_effect( filter_t *p_filter, picture_t *p_pic_
 
     /* update offset */
     p_sys->i_sliding_ofs += p_sys->i_sliding_speed * p_sys->i_height[Y_PLANE]
-                         * ( p_sys->i_cur_time - p_sys->i_last_time )
-                         / CLOCK_FREQ;
+                      * SEC_FROM_VLC_TICK( p_sys->i_cur_time - p_sys->i_last_time );
 
     p_sys->i_sliding_ofs = MOD( p_sys->i_sliding_ofs,
                                 p_sys->i_height[Y_PLANE] * 100 );



More information about the vlc-commits mailing list