Commit 70a43758 authored by Sebastian Rasmussen's avatar Sebastian Rasmussen Committed by Tim-Philipp Müller

shapewipe: Unref caps and element after usage

https://bugzilla.gnome.org/show_bug.cgi?id=734478
parent e8321af9
......@@ -448,20 +448,20 @@ static GstCaps *
gst_shape_wipe_mask_sink_getcaps (GstShapeWipe * self, GstPad * pad,
GstCaps * filter)
{
GstCaps *ret, *tmp;
GstCaps *ret, *tmp, *tcaps;
guint i, n;
if (gst_pad_has_current_caps (pad))
return gst_pad_get_current_caps (pad);
tcaps = gst_pad_get_pad_template_caps (self->video_sinkpad);
tmp = gst_pad_peer_query_caps (self->video_sinkpad, NULL);
if (tmp) {
ret =
gst_caps_intersect (tmp,
gst_pad_get_pad_template_caps (self->video_sinkpad));
ret = gst_caps_intersect (tmp, tcaps);
gst_caps_unref (tcaps);
gst_caps_unref (tmp);
} else {
ret = gst_pad_get_pad_template_caps (self->video_sinkpad);
ret = tcaps;
}
GST_LOG_OBJECT (pad, "video sink accepted caps: %" GST_PTR_FORMAT, ret);
......
......@@ -101,6 +101,7 @@ main (gint argc, gchar ** argv)
gst_object_add_control_binding (GST_OBJECT_CAST (shapewipe),
gst_direct_control_binding_new (GST_OBJECT_CAST (shapewipe), "position",
cs));
gst_object_unref (shapewipe);
g_object_set (cs,
"amplitude", 0.5,
......
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