vlc | branch: master | Steve Lhomme <[email protected]> | Tue Jun 7 11:15:13 2016 +0200| [2e65b64cf90608459be58205e85b4e4613bbc582] | committer: Jean-Baptiste Kempf
input: only check once if the demuxer has pf_demux Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e65b64cf90608459be58205e85b4e4613bbc582 --- src/input/input.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input/input.c b/src/input/input.c index d4acfda..1dd21d7 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -684,6 +684,9 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive ) bool b_pause_after_eof = b_interactive && var_InheritBool( p_input, "play-and-pause" ); + demux_t *p_demux = p_input->p->master->p_demux; + const bool b_can_demux = p_demux->pf_demux != NULL; + while( !input_Stopped( p_input ) && p_input->p->i_state != ERROR_S ) { mtime_t i_wakeup = -1; @@ -703,7 +706,7 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive ) MainLoopDemux( p_input, &b_force_update ); - if( p_input->p->master->p_demux->pf_demux != NULL ) + if( b_can_demux ) i_wakeup = es_out_GetWakeup( p_input->p->p_es_out ); if( b_force_update ) i_intf_update = 0; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
