From 0511d12e4ac6981149b7a4441207c02191346036 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 15 Apr 2015 15:16:33 +0200 Subject: [PATCH] glmixer: pass the proper free function to frames and buffers array 'array_buffers' contain borrowed GstBuffer and so shouldn't have a free function. 'frames' is the one containing GstGLMixerFrameData and so should use _free_glmixer_frame_data as free function. Fix GstGLMixerFrameData leaks with the validate.file.glvideomixer.simple.play_15s.synchronized scenario. https://bugzilla.gnome.org/show_bug.cgi?id=747913 Signed-off-by: Guillaume Desmottes --- ext/gl/gstglmixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c index 5becd24cd3..4e45124ed6 100644 --- a/ext/gl/gstglmixer.c +++ b/ext/gl/gstglmixer.c @@ -745,9 +745,9 @@ gst_gl_mixer_start (GstAggregator * agg) GstElement *element = GST_ELEMENT (agg); GST_OBJECT_LOCK (mix); - mix->array_buffers = g_ptr_array_new_full (element->numsinkpads, + mix->array_buffers = g_ptr_array_new_full (element->numsinkpads, NULL); + mix->frames = g_ptr_array_new_full (element->numsinkpads, (GDestroyNotify) _free_glmixer_frame_data); - mix->frames = g_ptr_array_new_full (element->numsinkpads, NULL); g_ptr_array_set_size (mix->array_buffers, element->numsinkpads); g_ptr_array_set_size (mix->frames, element->numsinkpads);