[vlc-devel] [PATCH] decoder: reset vout state only once

Romain Vimont rom1v at videolabs.io
Thu Mar 11 09:46:20 UTC 2021


LGTM, it fixes the problem for me.

Thank you!

On Thu, Mar 11, 2021 at 10:25:04AM +0100, Thomas Guillem wrote:
> Reset the vout state only if the new vout was just started.
> 
> Fixes assert(!sys->pause.is_on || !is_paused) on vout_ChangePause().
> ---
>  src/input/decoder.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index be048188595..4d9b58e14b4 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -483,12 +483,14 @@ static int ModuleThread_UpdateVideoFormat( decoder_t *p_dec, vlc_video_context *
>          p_owner->vout_started = true;
>          vlc_mutex_unlock( &p_owner->lock );
>  
> -        vlc_fifo_Lock( p_owner->p_fifo );
> -        p_owner->reset_out_state = true;
> -        vlc_fifo_Unlock( p_owner->p_fifo );
> -
>          if (has_started)
> +        {
> +            vlc_fifo_Lock( p_owner->p_fifo );
> +            p_owner->reset_out_state = true;
> +            vlc_fifo_Unlock( p_owner->p_fifo );
> +
>              decoder_Notify(p_owner, on_vout_started, p_vout, p_owner->vout_order);
> +        }
>          return 0;
>      }
>  
> -- 
> 2.30.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list