[vlc-commits] demux:mpeg: use VLC_TICK_FROM_SEC instead of hardcoded values

Steve Lhomme git at videolan.org
Tue Sep 18 09:43:46 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon May  7 14:51:56 2018 +0200| [722747ad85cdbcba86ed1b257bde5a6c90716d94] | committer: Steve Lhomme

demux:mpeg: use VLC_TICK_FROM_SEC instead of hardcoded values

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

 modules/demux/mpeg/es.c | 2 +-
 modules/demux/mpeg/ps.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index c0df825ad1..6f2389c036 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -423,7 +423,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 /* The first few seconds are guaranteed to be very whacky,
                  * don't bother trying ... Too bad */
                 if( f_pos < 0.01f ||
-                    (p_sys->i_pts + p_sys->i_time_offset) < 8000000 )
+                    (p_sys->i_pts + p_sys->i_time_offset) < VLC_TICK_FROM_SEC(8) )
                 {
                     return VLC_EGENERIC;
                 }
diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index 66b415cc47..42f88582c7 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -402,7 +402,7 @@ static void NotifyDiscontinuity( ps_track_t *p_tk, es_out_t *out )
 static void CheckPCR( demux_sys_t *p_sys, es_out_t *out, vlc_tick_t i_scr )
 {
     if( p_sys->i_scr != VLC_TICK_INVALID &&
-        llabs( p_sys->i_scr - i_scr ) > CLOCK_FREQ )
+        llabs( p_sys->i_scr - i_scr ) > VLC_TICK_FROM_SEC(1) )
         NotifyDiscontinuity( p_sys->tk, out );
 }
 



More information about the vlc-commits mailing list