]> git.sesse.net Git - vlc/commitdiff
Flush ES before deleting it (improves a bit a few mms/ogg/mp4)
authorLaurent Aimar <fenrir@videolan.org>
Sun, 27 May 2007 16:26:59 +0000 (16:26 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 27 May 2007 16:26:59 +0000 (16:26 +0000)
src/input/es_out.c

index 4783293cd743f577279230520881efb49a41092a..77b82043aab58569c003fad3b3a0b7a1b5ae5172 100644 (file)
@@ -1278,7 +1278,15 @@ static void EsOutDel( es_out_t *out, es_out_id_t *es )
 
     /* We don't try to reselect */
     if( es->p_dec )
+    {
+        while( !out->p_sys->p_input->b_die && es->p_dec )
+        {
+            if( input_DecoderEmpty( es->p_dec ) )
+                break;
+            msleep( 20*1000 );
+        }
         EsUnselect( out, es, es->p_pgrm == p_sys->p_pgrm );
+    }
 
     if( es->p_pgrm == p_sys->p_pgrm )
         EsOutESVarUpdate( out, es, VLC_TRUE );