[vlc-commits] es_out: do not start buffering when already buferring

Rémi Denis-Courmont git at videolan.org
Sat Mar 21 17:52:01 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 21 17:58:27 2015 +0200| [cc116115681a9c484ee23592ef16d724f843ae70] | committer: Rémi Denis-Courmont

es_out: do not start buffering when already buferring

This fixes an assertion failure.
Regression from 621400186a49b282197267e588a030b425829a64.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc116115681a9c484ee23592ef16d724f843ae70
---

 src/input/decoder.c |    2 --
 src/input/es_out.c  |   17 ++++++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 8cb162c..062a111 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 1446476..b232643 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++ )



More information about the vlc-commits mailing list