Commit ccba67b5 authored by Laurent Aimar's avatar Laurent Aimar

es_out_SetDelay cannot fail.

parent 6dad2831
......@@ -58,7 +58,7 @@ enum es_out_query_private_e
ES_OUT_GET_BUFFERING, /* arg1=bool* res=cannot fail */
/* Set delay for a ES category */
ES_OUT_SET_DELAY, /* arg1=es_category_e, res=can fail */
ES_OUT_SET_DELAY, /* arg1=es_category_e, res=cannot fail */
/* Set record state */
ES_OUT_SET_RECORD_STATE, /* arg1=bool res=can fail */
......@@ -111,9 +111,10 @@ static inline bool es_out_GetEmpty( es_out_t *p_out )
assert( !i_ret );
return b;
}
static inline int es_out_SetDelay( es_out_t *p_out, int i_cat, mtime_t i_delay )
static inline void es_out_SetDelay( es_out_t *p_out, int i_cat, mtime_t i_delay )
{
return es_out_Control( p_out, ES_OUT_SET_DELAY, i_cat, i_delay );
int i_ret = es_out_Control( p_out, ES_OUT_SET_DELAY, i_cat, i_delay );
assert( !i_ret );
}
static inline int es_out_SetRecordState( es_out_t *p_out, bool b_record )
{
......
......@@ -1920,19 +1920,15 @@ static bool Control( input_thread_t *p_input,
break;
case INPUT_CONTROL_SET_AUDIO_DELAY:
if( !es_out_SetDelay( p_input->p->p_es_out_display, AUDIO_ES, val.i_time ) )
{
input_SendEventAudioDelay( p_input, val.i_time );
UpdatePtsDelay( p_input );
}
es_out_SetDelay( p_input->p->p_es_out_display, AUDIO_ES, val.i_time );
input_SendEventAudioDelay( p_input, val.i_time );
UpdatePtsDelay( p_input );
break;
case INPUT_CONTROL_SET_SPU_DELAY:
if( !es_out_SetDelay( p_input->p->p_es_out_display, SPU_ES, val.i_time ) )
{
input_SendEventSubtitleDelay( p_input, val.i_time );
UpdatePtsDelay( p_input );
}
es_out_SetDelay( p_input->p->p_es_out_display, SPU_ES, val.i_time );
input_SendEventSubtitleDelay( p_input, val.i_time );
UpdatePtsDelay( p_input );
break;
case INPUT_CONTROL_SET_TITLE:
......
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