[vlc-commits] input: input: MainLoopDemux: use intermediate variable

Filip Roséen git at videolan.org
Sun Jul 22 11:52:48 CEST 2018


vlc/vlc-3.0 | branch: master | Filip Roséen <filip at atch.se> | Fri Jul 20 10:05:16 2018 +0200| [20a0fe5fdcaca5d95c4b65849e44b79cb339262b] | committer: Jean-Baptiste Kempf

input: input: MainLoopDemux: use intermediate variable

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit bba34c6ccde75a8a0f9f6b3b148bc52868ad3537)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/input/input.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 9814a0b95d..4de864717a 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -559,11 +559,12 @@ 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 = input_priv(p_input)->master->p_demux;
+    input_thread_private_t* p_priv = input_priv(p_input);
+    demux_t *p_demux = p_priv->master->p_demux;
 
     *pb_changed = false;
 
-    if( input_priv(p_input)->i_stop > 0 && input_priv(p_input)->i_time >= input_priv(p_input)->i_stop )
+    if( p_priv->i_stop > 0 && p_priv->i_time >= p_priv->i_stop )
         i_ret = VLC_DEMUXER_EOF;
     else
         i_ret = demux_Demux( p_demux );
@@ -575,7 +576,7 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed )
         if( demux_TestAndClearFlags( p_demux, INPUT_UPDATE_TITLE_LIST ) )
             UpdateTitleListfromDemux( p_input );
 
-        if( input_priv(p_input)->master->b_title_demux )
+        if( p_priv->master->b_title_demux )
         {
             i_ret = UpdateTitleSeekpointFromDemux( p_input );
             *pb_changed = true;
@@ -587,14 +588,14 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed )
     if( i_ret == VLC_DEMUXER_EOF )
     {
         msg_Dbg( p_input, "EOF reached" );
-        input_priv(p_input)->master->b_eof = true;
-        es_out_Eos(input_priv(p_input)->p_es_out);
+        p_priv->master->b_eof = true;
+        es_out_Eos(p_priv->p_es_out);
     }
     else if( i_ret == VLC_DEMUXER_EGENERIC )
     {
         input_ChangeState( p_input, ERROR_S );
     }
-    else if( input_priv(p_input)->i_slave > 0 )
+    else if( p_priv->i_slave > 0 )
         SlaveDemux( p_input );
 }
 



More information about the vlc-commits mailing list