Commit 1c89ed78 authored by Jean-Paul Saman's avatar Jean-Paul Saman

video_output core: make sure the stop the display thread when not reusing the vout.

When the vout is not reused the display thread was not properly stopped.
parent 877d898f
......@@ -204,14 +204,8 @@ vout_thread_t *(vout_Request)(vlc_object_t *object,
/* If a vout is provided, try reusing it */
if (vout) {
if (!vout_CanVoutBeRecycled(vout))
{
vout_control_cmd_t cmd;
vout_control_cmd_Init(&cmd, VOUT_CONTROL_CLEAN);
cmd.u.cfg = cfg;
vout_control_Push(&vout->p->control, &cmd);
goto no_reuse;
}
if (vout->p->input != cfg->input) {
if (vout->p->input)
spu_Attach(vout->p->spu, vout->p->input, false);
......@@ -233,7 +227,15 @@ vout_thread_t *(vout_Request)(vlc_object_t *object,
msg_Dbg(object, "reusing provided vout");
return vout;
}
no_reuse:
{
vout_control_cmd_t cmd;
vout_control_cmd_Init(&cmd, VOUT_CONTROL_CLEAN);
cmd.u.cfg = cfg;
vout_control_Push(&vout->p->control, &cmd);
}
vout_CloseAndRelease(vout);
msg_Warn(object, "cannot reuse provided vout");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment