[vlc-commits] video_output: fix window leak
Rémi Denis-Courmont
git at videolan.org
Sat Apr 25 09:24:48 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 25 10:05:10 2015 +0300| [72e0c0e9226ed306e2e82b586938991d7acfd3ff] | committer: Rémi Denis-Courmont
video_output: fix window leak
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=72e0c0e9226ed306e2e82b586938991d7acfd3ff
---
src/video_output/video_output.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index d5aee4d..b7af9d4 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -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);
More information about the vlc-commits
mailing list