From: Guillaume Desmottes Date: Wed, 15 Apr 2015 12:49:02 +0000 (+0200) Subject: glcolorconvertelement: fix GstGLColorConvert leak X-Git-Tag: 1.6.0~1029 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17446a420cb1ca4b2646af69c5bdc69e08796ff1;p=platform%2Fupstream%2Fgst-plugins-bad.git glcolorconvertelement: fix GstGLColorConvert leak convert->convert was never unreffed. This can be reproduce with the validate.file.glvideomixer.simple.play_15s.synchronized scenario. https://bugzilla.gnome.org/show_bug.cgi?id=747911 --- diff --git a/ext/gl/gstglcolorconvertelement.c b/ext/gl/gstglcolorconvertelement.c index a3118f8..35c9711 100644 --- a/ext/gl/gstglcolorconvertelement.c +++ b/ext/gl/gstglcolorconvertelement.c @@ -62,6 +62,21 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_GL_COLOR_CONVERT_VIDEO_CAPS)); +static gboolean +gst_gl_color_convert_element_stop (GstBaseTransform * bt) +{ + GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (bt); + + if (convert->convert) { + gst_object_unref (convert->convert); + convert->convert = NULL; + } + + return + GST_BASE_TRANSFORM_CLASS (gst_gl_color_convert_element_parent_class)->stop + (bt); +} + static void gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass) { @@ -75,6 +90,7 @@ gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass) bt_class->prepare_output_buffer = gst_gl_color_convert_element_prepare_output_buffer; bt_class->transform = gst_gl_color_convert_element_transform; + bt_class->stop = gst_gl_color_convert_element_stop; bt_class->passthrough_on_same_caps = TRUE;