summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2010-04-30 11:27:12 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2010-05-04 11:44:27 +0200
commit72c512a87d29d73c412a198d1a9f5e0095990f0c (patch)
tree3529506c8bd23bca6eac24a6ddfa8edb89f43f86
parentd020295ae0ed79fe7db3628a5e0ee2158274cfa5 (diff)
utils: use reffed _get_caps() version
We don't need to have a writable copy so we can use the _reffed version instead.
-rw-r--r--gst/gstutils.c6
1 files 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);