From: RĂ©mi Denis-Courmont Date: Sat, 21 Mar 2015 15:58:27 +0000 (+0200) Subject: es_out: do not start buffering when already buferring X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=cc116115681a9c484ee23592ef16d724f843ae70 es_out: do not start buffering when already buferring This fixes an assertion failure. Regression from 621400186a49b282197267e588a030b425829a64. --- diff --git a/src/input/decoder.c b/src/input/decoder.c index 8cb162c4d3..062a111b65 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -533,8 +533,6 @@ void input_DecoderStartWait( decoder_t *p_dec ) assert( !p_owner->b_waiting ); - input_DecoderFlush( p_dec ); - vlc_mutex_lock( &p_owner->lock ); p_owner->b_first = true; p_owner->b_has_data = false; diff --git a/src/input/es_out.c b/src/input/es_out.c index 14464769e7..b2326435e9 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -573,13 +573,16 @@ static void EsOutChangePosition( es_out_t *out ) { es_out_id_t *p_es = p_sys->es[i]; - if( !p_es->p_dec ) - continue; - - input_DecoderStartWait( p_es->p_dec ); - - if( p_es->p_dec_record ) - input_DecoderStartWait( p_es->p_dec_record ); + if( p_es->p_dec != NULL ) + { + input_DecoderFlush( p_es->p_dec ); + if( !p_sys->b_buffering ) + { + input_DecoderStartWait( p_es->p_dec ); + if( p_es->p_dec_record != NULL ) + input_DecoderStartWait( p_es->p_dec_record ); + } + } } for( int i = 0; i < p_sys->i_pgrm; i++ )