Commit 4ccf151d authored by Sebastian Dröge's avatar Sebastian Dröge 🍵 Committed by Tim-Philipp Müller

glcolorconvertelement: Also unref caps in ::stop() already

They are not useful anymore afterwards, so keeping them until ::finalize()
might only cause someone to use them later and then fail.
parent 3294854c
......@@ -35,7 +35,6 @@ G_DEFINE_TYPE_WITH_CODE (GstGLColorConvertElement, gst_gl_color_convert_element,
"glconvertelement", 0, "convert");
);
static void gst_gl_color_convert_element_finalize (GObject * object);
static gboolean gst_gl_color_convert_element_set_caps (GstBaseTransform * bt,
GstCaps * in_caps, GstCaps * out_caps);
static GstCaps *gst_gl_color_convert_element_transform_caps (GstBaseTransform *
......@@ -72,6 +71,9 @@ gst_gl_color_convert_element_stop (GstBaseTransform * bt)
convert->convert = NULL;
}
gst_caps_replace (&convert->in_caps, NULL);
gst_caps_replace (&convert->out_caps, NULL);
return
GST_BASE_TRANSFORM_CLASS (gst_gl_color_convert_element_parent_class)->stop
(bt);
......@@ -105,8 +107,6 @@ gst_gl_color_convert_element_class_init (GstGLColorConvertElementClass * klass)
"OpenGL color converter", "Filter/Converter/Video",
"Converts between color spaces using OpenGL shaders",
"Matthew Waters <matthew@centricular.com>");
G_OBJECT_CLASS (klass)->finalize = gst_gl_color_convert_element_finalize;
}
static void
......@@ -116,17 +116,6 @@ gst_gl_color_convert_element_init (GstGLColorConvertElement * convert)
TRUE);
}
static void
gst_gl_color_convert_element_finalize (GObject * object)
{
GstGLColorConvertElement *convert = GST_GL_COLOR_CONVERT_ELEMENT (object);
gst_caps_replace (&convert->in_caps, NULL);
gst_caps_replace (&convert->out_caps, NULL);
G_OBJECT_CLASS (gst_gl_color_convert_element_parent_class)->finalize (object);
}
static gboolean
gst_gl_color_convert_element_set_caps (GstBaseTransform * bt,
GstCaps * in_caps, GstCaps * out_caps)
......
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