[vlc-devel] commit: Fixed decoder deadlock when stream output control the pace. ( Laurent Aimar )

git version control git at videolan.org
Thu Nov 20 19:58:09 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Nov 20 19:04:09 2008 +0100| [1d67fa1de3437f84a4ea73eaf7300d349add9c6e] | committer: Laurent Aimar 

Fixed decoder deadlock when stream output control the pace.

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

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

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 87d5dc8..1421367 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -370,7 +370,12 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block )
 
     if( p_owner->p_input->p->b_out_pace_control )
     {
-        block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX );
+        /* The fifo is not consummed when buffering and so will
+         * deadlock vlc.
+         * There is no need to lock as b_buffering is never modify
+         * inside decoder thread. */
+        if( !p_owner->b_buffering )
+            block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX );
     }
     else if( block_FifoSize( p_owner->p_fifo ) > 50000000 /* 50 MB */ )
     {




More information about the vlc-devel mailing list