[vlc-devel] [PATCH 1/6] input: only check once if the demuxer has pf_demux
Steve Lhomme
robux4 at videolabs.io
Tue Jun 7 11:15:13 CEST 2016
---
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;
--
2.7.0
More information about the vlc-devel
mailing list