[vlc-commits] decoder: display subtitles on seek while paused

Romain Vimont git at videolan.org
Sun Apr 22 18:57:48 CEST 2018


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Apr 20 11:30:56 2018 +0200| [b529d4e20e10027d0a5c42945335819e34343f64] | committer: Jean-Baptiste Kempf

decoder: display subtitles on seek while paused

While paused, make the SPU decoder process one block on seek, in order
to display the matching subtitle immediately.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/input/decoder.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 98817e6f39..456b103935 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2139,9 +2139,10 @@ void input_DecoderFlush( decoder_t *p_dec )
      * a row. */
     p_owner->flushing = true;
 
-    /* Flushing video decoder when paused: increment frames_countdown in order
-     * to display one frame */
-    if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->paused
+    /* Flush video/spu decoder when paused: increment frames_countdown in order
+     * to display one frame/subtitle */
+    if( p_owner->paused
+     && ( p_owner->fmt.i_cat == VIDEO_ES || p_owner->fmt.i_cat == SPU_ES )
      && p_owner->frames_countdown == 0 )
         p_owner->frames_countdown++;
 



More information about the vlc-commits mailing list