[vlc-devel] [RFC PATCH 2/4] decoder: don't wait if paused

Thomas Guillem thomas at gllm.fr
Tue Nov 17 16:16:33 CET 2015


(don't need to lock p_owner->paused  since it's only modified by input)
---
 src/input/decoder.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 16c985a..9fdc200 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2020,9 +2020,10 @@ void input_DecoderWait( decoder_t *p_dec )
     vlc_mutex_lock( &p_owner->lock );
     while( !p_owner->b_has_data )
     {
+        if( p_owner->paused )
+            break;
         vlc_fifo_Lock( p_owner->p_fifo );
-        if( p_owner->b_idle
-         && (vlc_fifo_IsEmpty( p_owner->p_fifo ) || p_owner->paused) )
+        if( p_owner->b_idle && vlc_fifo_IsEmpty( p_owner->p_fifo ) )
         {
             msg_Err( p_dec, "buffer deadlock prevented" );
             vlc_fifo_Unlock( p_owner->p_fifo );
-- 
2.1.4



More information about the vlc-devel mailing list