[vlc-devel] [PATCH] decoder: empty the input fifo on delete
Thomas Guillem
thomas at gllm.fr
Wed Sep 2 12:22:55 CEST 2015
This speeds up decoder termination.
---
src/input/decoder.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 25eac79..2926568 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1823,6 +1823,12 @@ void input_DecoderDelete( decoder_t *p_dec )
/* Make sure we aren't paused/waiting/decoding anymore */
vlc_mutex_lock( &p_owner->lock );
+
+ /* Empty the fifo */
+ vlc_fifo_Lock( p_owner->p_fifo );
+ block_ChainRelease( vlc_fifo_DequeueAllUnlocked( p_owner->p_fifo ) );
+ vlc_fifo_Unlock( p_owner->p_fifo );
+
p_owner->b_paused = false;
p_owner->b_waiting = false;
p_owner->b_flushing = true;
--
2.1.4
More information about the vlc-devel
mailing list