Skip to content
Snippets Groups Projects
Commit a1924dbd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

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 4586ffaf.
parent 6bfeb1d8
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment