[vlc-devel] [PATCH 3/6] input: code cleaning

Steve Lhomme robux4 at videolabs.io
Tue Jun 7 11:15:15 CEST 2016


---
 src/input/input.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index f1a045e..2c2e9a2 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -549,24 +549,25 @@ bool input_Stopped( input_thread_t *input )
 static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed )
 {
     int i_ret;
+    demux_t *p_demux = p_input->p->master->p_demux;
 
     *pb_changed = false;
 
     if( p_input->p->i_stop > 0 && p_input->p->i_time >= p_input->p->i_stop )
         i_ret = VLC_DEMUXER_EOF;
     else
-        i_ret = demux_Demux( p_input->p->master->p_demux );
+        i_ret = demux_Demux( p_demux );
 
     i_ret = i_ret > 0 ? VLC_DEMUXER_SUCCESS : ( i_ret < 0 ? VLC_DEMUXER_EGENERIC : VLC_DEMUXER_EOF);
 
     if( i_ret == VLC_DEMUXER_SUCCESS )
     {
-        if( p_input->p->master->p_demux->info.i_update )
+        if( p_demux->info.i_update )
         {
-            if( p_input->p->master->p_demux->info.i_update & INPUT_UPDATE_TITLE_LIST )
+            if( p_demux->info.i_update & INPUT_UPDATE_TITLE_LIST )
             {
                 UpdateTitleListfromDemux( p_input );
-                p_input->p->master->p_demux->info.i_update &= ~INPUT_UPDATE_TITLE_LIST;
+                p_demux->info.i_update &= ~INPUT_UPDATE_TITLE_LIST;
             }
             if( p_input->p->master->b_title_demux )
             {
-- 
2.7.0



More information about the vlc-devel mailing list