[vlc-commits] input: go to error rather than end state upon failure to resume
Rémi Denis-Courmont
git at videolan.org
Sun Jun 7 21:43:50 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 6 21:32:41 2015 +0300| [17f7c2ea592a3110879e4f4465948ee19347d5ad] | committer: Rémi Denis-Courmont
input: go to error rather than end state upon failure to resume
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17f7c2ea592a3110879e4f4465948ee19347d5ad
---
src/input/input.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 4c073bb..8208acd 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -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,
More information about the vlc-commits
mailing list