[vlc-commits] demux: mod: the vlc_tick_t received with SET_TIME is likely to be valid

Steve Lhomme git at videolan.org
Thu Sep 20 12:44:02 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun  1 11:25:04 2018 +0200| [1cc79c8f9030fa9bf428cf3420d27fd65b64e613] | committer: Steve Lhomme

demux: mod: the vlc_tick_t received with SET_TIME is likely to be valid

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

 modules/demux/mod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mod.c b/modules/demux/mod.c
index 1961265655..dc5d82d9b8 100644
--- a/modules/demux/mod.c
+++ b/modules/demux/mod.c
@@ -337,7 +337,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     case DEMUX_SET_TIME:
         i64 = va_arg( args, vlc_tick_t );
 
-        if( i64 >= 0 && i64 <= p_sys->i_length )
+        if( likely(i64 >= 0) && i64 <= p_sys->i_length )
         {
             ModPlug_Seek( p_sys->f, MS_FROM_VLC_TICK( i64 ) );
             date_Set( &p_sys->pts, VLC_TICK_0 + i64 );



More information about the vlc-commits mailing list