[vlc-devel] commit: Flush audio/subtitle in next frame. (Laurent Aimar )

git version control git at videolan.org
Wed Oct 22 22:22:06 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Oct 21 20:55:47 2008 +0200| [a996e2cad8e232fc5c914fe3456fbd4951600203] | committer: Laurent Aimar 

Flush audio/subtitle in next frame.

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

 src/input/decoder.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 05d6246..fda7c47 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -538,15 +538,21 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration )
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
 
     *pi_duration = 0;
-    if( p_dec->fmt_in.i_cat != VIDEO_ES )
-        return;
 
     vlc_mutex_lock( &p_owner->lock );
-    if( p_owner->b_paused && p_owner->p_vout )
+    if( p_dec->fmt_in.i_cat == VIDEO_ES )
     {
-        vout_NextPicture( p_owner->p_vout, pi_duration );
-        p_owner->pause.i_ignore++;
-        vlc_cond_signal( &p_owner->wait );
+        if( p_owner->b_paused && p_owner->p_vout )
+        {
+            vout_NextPicture( p_owner->p_vout, pi_duration );
+            p_owner->pause.i_ignore++;
+            vlc_cond_signal( &p_owner->wait );
+        }
+    }
+    else
+    {
+        /* TODO subtitle should not be flushed */
+        DecoderFlush( p_dec );
     }
     vlc_mutex_unlock( &p_owner->lock );
 }




More information about the vlc-devel mailing list