Commit 5ffe7e00 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Don't call input_ChangeState() constantly while being in error state, because...

Don't call input_ChangeState() constantly while being in error state, because it triggers callbacks at each call. This can result in a busy rc interface.
parent 2a40307c
...@@ -835,7 +835,6 @@ static int Init( input_thread_t * p_input ) ...@@ -835,7 +835,6 @@ static int Init( input_thread_t * p_input )
{ {
/* Create a new one */ /* Create a new one */
p_input->p->p_sout = sout_NewInstance( p_input, psz ); p_input->p->p_sout = sout_NewInstance( p_input, psz );
if( !p_input->p->p_sout ) if( !p_input->p->p_sout )
{ {
input_ChangeState( p_input, ERROR_S ); input_ChangeState( p_input, ERROR_S );
...@@ -1253,10 +1252,10 @@ error: ...@@ -1253,10 +1252,10 @@ error:
*****************************************************************************/ *****************************************************************************/
static void Error( input_thread_t *p_input ) static void Error( input_thread_t *p_input )
{ {
input_ChangeState( p_input, ERROR_S );
while( !p_input->b_die ) while( !p_input->b_die )
{ {
/* Sleep a while */ /* Sleep a while */
input_ChangeState( p_input, ERROR_S );
msleep( INPUT_IDLE_SLEEP ); msleep( INPUT_IDLE_SLEEP );
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment