[vlc-commits] demux: mjpeg: init/reset i_still_end to VLC_TICK_INVALID

Steve Lhomme git at videolan.org
Wed Sep 19 13:23:57 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun  1 12:47:37 2018 +0200| [0b236e35d1be3aa994599c7898638cd710940653] | committer: Steve Lhomme

demux: mjpeg: init/reset i_still_end to VLC_TICK_INVALID

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

 modules/demux/mjpeg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index 7e6e029dc4..e583a640bb 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -366,7 +366,7 @@ static int Open( vlc_object_t * p_this )
     /* Frame rate */
     float f_fps = var_InheritFloat( p_demux, "mjpeg-fps" );
 
-    p_sys->i_still_end = 0;
+    p_sys->i_still_end = VLC_TICK_INVALID;
     if( demux_IsPathExtension( p_demux, ".jpeg" ) ||
         demux_IsPathExtension( p_demux, ".jpg" ) )
     {
@@ -400,11 +400,11 @@ static int MjpgDemux( demux_t *p_demux )
     demux_sys_t *p_sys = p_demux->p_sys;
     int i;
 
-    if( p_sys->b_still && p_sys->i_still_end )
+    if( p_sys->b_still && p_sys->i_still_end != VLC_TICK_INVALID )
     {
         /* Still frame, wait until the pause delay is gone */
         vlc_tick_wait( p_sys->i_still_end );
-        p_sys->i_still_end = 0;
+        p_sys->i_still_end = VLC_TICK_INVALID;
         return VLC_DEMUXER_SUCCESS;
     }
 



More information about the vlc-commits mailing list