mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
shapewipe: Unref caps and element after usage
https://bugzilla.gnome.org/show_bug.cgi?id=734478
This commit is contained in:
parent
e8321af983
commit
70a43758bb
2 changed files with 6 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue