]> git.sesse.net Git - vlc/commitdiff
es_out: do not start buffering when already buferring
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Mar 2015 15:58:27 +0000 (17:58 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Mar 2015 16:52:00 +0000 (18:52 +0200)
This fixes an assertion failure.
Regression from 621400186a49b282197267e588a030b425829a64.

src/input/decoder.c
src/input/es_out.c

index 8cb162c4d3f476d0fc54b4fdca037392b66d5466..062a111b6520aa1d6cc7d5573b5905e4eeb09b8e 100644 (file)
@@ -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;
index 14464769e726404fb4c2d820433f333cd1332eea..b2326435e9923971fbc862425f8078a860a0347c 100644 (file)
@@ -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++ )