Commit 72e0c0e9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

video_output: fix window leak

parent 0befeec5
......@@ -193,6 +193,8 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
/* */
if (vlc_clone(&vout->p->thread, Thread, vout,
VLC_THREAD_PRIORITY_OUTPUT)) {
if (vout->p->window != NULL)
vout_display_window_Delete(vout->p->window);
spu_Destroy(vout->p->spu);
vlc_object_release(vout);
return NULL;
......@@ -267,6 +269,9 @@ void vout_Close(vout_thread_t *vout)
vout_control_PushVoid(&vout->p->control, VOUT_CONTROL_CLEAN);
vlc_join(vout->p->thread, NULL);
if (vout->p->window != NULL)
vout_display_window_Delete(vout->p->window);
vlc_mutex_lock(&vout->p->spu_lock);
spu_Destroy(vout->p->spu);
vout->p->spu = NULL;
......@@ -1378,8 +1383,6 @@ static void ThreadInit(vout_thread_t *vout)
static void ThreadClean(vout_thread_t *vout)
{
if (vout->p->window != NULL)
vout_window_Delete(vout->p->window);
vout_chrono_Clean(&vout->p->render);
vout->p->dead = true;
vout_control_Dead(&vout->p->control);
......
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