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

Romain Vimont git at videolan.org
Fri Apr 27 15:33:05 CEST 2018


vlc/vlc-3.0 | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Apr 20 11:30:56 2018 +0200| [3bf766e104b21d15415dc921a32092fda9f12907] | committer: Hugo Beauzée-Luyssen

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>
(cherry picked from commit b529d4e20e10027d0a5c42945335819e34343f64)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 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 c5ec930b2a..87f26e5258 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2120,9 +2120,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