[vlc-commits] subsdelay: SubsdelayEstimateDelay() returns an vlc_tick_t

Steve Lhomme git at videolan.org
Tue Sep 18 16:42:36 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 13 17:42:49 2018 +0200| [02adb7e6476fce21abea6ec30b99965836ff0917] | committer: Steve Lhomme

subsdelay: SubsdelayEstimateDelay() returns an vlc_tick_t

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

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

diff --git a/modules/spu/subsdelay.c b/modules/spu/subsdelay.c
index c5a53ad73e..4e06788427 100644
--- a/modules/spu/subsdelay.c
+++ b/modules/spu/subsdelay.c
@@ -200,7 +200,7 @@ static int SubsdelayCallback( vlc_object_t *p_this, char const *psz_var, vlc_val
 
 static void SubsdelayEnforceDelayRules( filter_t *p_filter );
 
-static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_t *p_entry );
+static vlc_tick_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_t *p_entry );
 
 static void SubsdelayRecalculateDelays( filter_t *p_filter );
 
@@ -1161,7 +1161,7 @@ static void SubpicDestroyClone( subpicture_t *p_subpic )
  * SubsdelayEstimateDelay: Calculate new subtitle delay according to its
  *     content and the calculation mode
  *****************************************************************************/
-static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_t *p_entry )
+static vlc_tick_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_t *p_entry )
 {
     int i_mode;
     int i_rank;
@@ -1182,7 +1182,7 @@ static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_
             //FIXME: We only use a single segment here
             i_rank = SubsdelayGetTextRank( p_entry->p_subpic->p_region->p_text->psz_text );
 
-            return (int64_t)( i_rank * CLOCK_FREQ * p_sys->f_factor );
+            return (vlc_tick_t)( i_rank * CLOCK_FREQ * p_sys->f_factor );
         }
 
         /* content is unavailable, calculation mode should be based on source delay */
@@ -1191,7 +1191,7 @@ static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_
 
     if( likely(i_mode == SUBSDELAY_MODE_RELATIVE_SOURCE_DELAY) )
     {
-        return (int64_t)( p_sys->f_factor * ( p_entry->p_source->i_stop - p_entry->p_source->i_start ) );
+        return (vlc_tick_t)( p_sys->f_factor * ( p_entry->p_source->i_stop - p_entry->p_source->i_start ) );
     }
 
     return VLC_TICK_FROM_SEC(10); /* 10 sec */



More information about the vlc-commits mailing list