[vlc-devel] [vlc-commits] resource: atomically return vout on failure (fixes #22284)

Thomas Guillem thomas at gllm.fr
Thu May 9 09:37:41 CEST 2019


I don't think this will be useful if https://code.videolan.org/tguillem/vlc/commit/1bd6ab72591f5be92ac4f8ad0ffbb2e77912ee68 is merged.


On Wed, May 8, 2019, at 21:37, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May  
> 8 22:21:52 2019 +0300| [a1924dbd8bb3e3c146ef150191dcf8ffa0be0a59] | 
> committer: Rémi Denis-Courmont
> 
> resource: atomically return vout on failure (fixes #22284)
> 
> If vout_Request() fails, atomically mark the still stopped vout as free.
> This removes a quick hack from 4586ffaf28c0756e48d0fa607083417dda630a2d.
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a1924dbd8bb3e3c146ef150191dcf8ffa0be0a59
> ---
> 
>  src/input/resource.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/input/resource.c b/src/input/resource.c
> index 13b4b97d07..56ce537753 100644
> --- a/src/input/resource.c
> +++ b/src/input/resource.c
> @@ -356,8 +356,11 @@ vout_thread_t 
> *input_resource_GetVout(input_resource_t *p_resource,
>      }
>  
>      if (vout_Request(cfg, p_resource->p_input)) {
> +        if (p_resource->p_vout_free == NULL && p_resource->i_vout == 0)
> +            p_resource->p_vout_free = vout;
> +        else
> +            vout_Close(vout);
>          vlc_mutex_unlock(&p_resource->lock);
> -        input_resource_PutVout(p_resource, cfg->vout);
>          return NULL;
>      }
>  
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
>


More information about the vlc-devel mailing list