[vlc-devel] [RFC PATCH 2/4] decoder: don't wait if paused
Rémi Denis-Courmont
remi at remlab.net
Tue Nov 17 16:45:08 CET 2015
Le 2015-11-17 18:16, Thomas Guillem a écrit :
> (don't need to lock p_owner->paused since it's only modified by
> input)
Possibly OK but belongs as a comment in the code.
> ---
> 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 );
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list