[vlc-commits] input: code simplification

Steve Lhomme git at videolan.org
Tue Jun 7 11:32:38 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Jun  7 11:15:15 2016 +0200| [e49021ba7f0dc0fa74bc59e2c2a2faf119ffd661] | committer: Jean-Baptiste Kempf

input: code simplification

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 )
             {



More information about the vlc-commits mailing list