[vlc-commits] decoder: don't wait if paused
Thomas Guillem
git at videolan.org
Thu Nov 19 10:18:58 CET 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 10 17:33:00 2015 +0100| [4637aca08783615a4aeb242aec9e1e0626a58784] | committer: Thomas Guillem
decoder: don't wait if paused
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4637aca08783615a4aeb242aec9e1e0626a58784
---
src/input/decoder.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index db1e5a3..38cafc2 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2030,9 +2030,12 @@ void input_DecoderWait( decoder_t *p_dec )
vlc_mutex_lock( &p_owner->lock );
while( !p_owner->b_has_data )
{
+ /* Don't need to lock p_owner->paused since it's only modified by the
+ * owner */
+ 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 );
More information about the vlc-commits
mailing list