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