[vlc-devel] [PATCH] decoder: display one frame on flush if video is paused

Thomas Guillem thomas at gllm.fr
Mon Nov 9 11:32:58 CET 2015


---
 src/input/decoder.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 31d81b7..8da034a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1877,6 +1877,12 @@ void input_DecoderFlush( decoder_t *p_dec )
     block_ChainRelease( vlc_fifo_DequeueAllUnlocked( p_owner->p_fifo ) );
     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
+     && p_owner->frames_countdown == 0 )
+        p_owner->frames_countdown++;
+
     vlc_fifo_Signal( p_owner->p_fifo );
 
     /* Monitor for flush end */
-- 
2.1.4



More information about the vlc-devel mailing list