Commit 17f7c2ea authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input: go to error rather than end state upon failure to resume

parent 54776b96
...@@ -1579,30 +1579,26 @@ static void ControlPause( input_thread_t *p_input, mtime_t i_control_date ) ...@@ -1579,30 +1579,26 @@ static void ControlPause( input_thread_t *p_input, mtime_t i_control_date )
static void ControlUnpause( input_thread_t *p_input, mtime_t i_control_date ) static void ControlUnpause( input_thread_t *p_input, mtime_t i_control_date )
{ {
int i_ret = VLC_SUCCESS;
if( p_input->p->b_can_pause ) if( p_input->p->b_can_pause )
{ {
demux_t *p_demux = p_input->p->input.p_demux; demux_t *p_demux = p_input->p->input.p_demux;
int ret;
if( p_demux->s != NULL ) if( p_demux->s != NULL )
i_ret = stream_Control( p_demux->s, STREAM_SET_PAUSE_STATE, false ); ret = stream_Control( p_demux->s, STREAM_SET_PAUSE_STATE, false );
else else
i_ret = demux_Control( p_demux, DEMUX_SET_PAUSE_STATE, false ); ret = demux_Control( p_demux, DEMUX_SET_PAUSE_STATE, false );
if( i_ret ) if( ret != VLC_SUCCESS )
{ {
/* FIXME What to do ? */ msg_Err( p_input, "cannot resume" );
msg_Warn( p_input, "cannot unset pause -> EOF" ); input_ChangeState( p_input, ERROR_S );
input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL ); return;
} }
} }
/* Switch to play */ /* Switch to play */
input_ChangeState( p_input, PLAYING_S ); input_ChangeState( p_input, PLAYING_S );
es_out_SetPauseState( p_input->p->p_es_out, false, false, i_control_date );
/* */
if( !i_ret )
es_out_SetPauseState( p_input->p->p_es_out, false, false, i_control_date );
} }
static bool Control( input_thread_t *p_input, static bool Control( input_thread_t *p_input,
......
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