[vlc-commits] demux: fix missing initializer

Rémi Denis-Courmont git at videolan.org
Sat Jul 8 15:35:09 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul  8 16:22:46 2017 +0300| [4ff4411d18fc2a2854ba721952126ff7f2c3d66a] | committer: Rémi Denis-Courmont

demux: fix missing initializer

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

 src/input/demux.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/input/demux.c b/src/input/demux.c
index 466730a21e..58c1ae0e68 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -608,12 +608,14 @@ static bool SkipAPETag( demux_t *p_demux )
 
 unsigned demux_TestAndClearFlags( demux_t *p_demux, unsigned flags )
 {
-    unsigned i_update;
-    if ( demux_Control( p_demux, DEMUX_TEST_AND_CLEAR_FLAGS, &i_update ) == VLC_SUCCESS )
-        return i_update;
-    unsigned ret = p_demux->info.i_update & flags;
+    unsigned update = flags;
+
+    if ( demux_Control( p_demux, DEMUX_TEST_AND_CLEAR_FLAGS, &update ) == VLC_SUCCESS )
+        return update;
+
+    update = p_demux->info.i_update & flags;
     p_demux->info.i_update &= ~flags;
-    return ret;
+    return update;
 }
 
 int demux_GetTitle( demux_t *p_demux )



More information about the vlc-commits mailing list