mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
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
This commit is contained in:
parent
87a336350d
commit
3294854c6d
1 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue