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

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 )
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 )
{
demux_t *p_demux = p_input->p->input.p_demux;
int ret;
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
i_ret = demux_Control( p_demux, DEMUX_SET_PAUSE_STATE, false );
if( i_ret )
ret = demux_Control( p_demux, DEMUX_SET_PAUSE_STATE, false );
if( ret != VLC_SUCCESS )
{
/* FIXME What to do ? */
msg_Warn( p_input, "cannot unset pause -> EOF" );
input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL );
msg_Err( p_input, "cannot resume" );
input_ChangeState( p_input, ERROR_S );
return;
}
}
/* Switch to play */
input_ChangeState( p_input, PLAYING_S );
/* */
if( !i_ret )
es_out_SetPauseState( p_input->p->p_es_out, false, false, i_control_date );
es_out_SetPauseState( p_input->p->p_es_out, false, false, i_control_date );
}
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