From 72c512a87d29d73c412a198d1a9f5e0095990f0c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 30 Apr 2010 11:27:12 +0200 Subject: utils: use reffed _get_caps() version We don't need to have a writable copy so we can use the _reffed version instead. --- gst/gstutils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/gstutils.c b/gst/gstutils.c index e007aca20c..434bafdd13 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -1136,7 +1136,7 @@ gst_element_get_compatible_pad (GstElement * element, GstPad * pad, gboolean compatible; /* Now check if the two pads' caps are compatible */ - temp = gst_pad_get_caps (pad); + temp = gst_pad_get_caps_reffed (pad); if (caps) { intersection = gst_caps_intersect (temp, caps); gst_caps_unref (temp); @@ -1144,7 +1144,7 @@ gst_element_get_compatible_pad (GstElement * element, GstPad * pad, intersection = temp; } - temp = gst_pad_get_caps (current); + temp = gst_pad_get_caps_reffed (current); compatible = gst_caps_can_intersect (temp, intersection); gst_caps_unref (temp); gst_caps_unref (intersection); @@ -1190,7 +1190,7 @@ gst_element_get_compatible_pad (GstElement * element, GstPad * pad, /* try to create a new one */ /* requesting is a little crazy, we need a template. Let's create one */ /* FIXME: why not gst_pad_get_pad_template (pad); */ - templcaps = gst_pad_get_caps (pad); + templcaps = gst_pad_get_caps_reffed (pad); templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad), GST_PAD_DIRECTION (pad), GST_PAD_ALWAYS, templcaps); -- cgit v1.2.3