summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmux/gstrtpmux.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c
index e62f8a14..ecef0c7f 100644
--- a/gst/rtpmux/gstrtpmux.c
+++ b/gst/rtpmux/gstrtpmux.c
@@ -431,12 +431,16 @@ same_clock_rate_fold (gpointer item, GValue * ret, gpointer user_data)
const GstCaps *accumcaps;
GstCaps *intersect;
- if (pad == mypad)
+ if (pad == mypad) {
+ gst_object_unref (pad);
return TRUE;
+ }
peercaps = gst_pad_peer_get_caps (pad);
- if (!peercaps)
+ if (!peercaps) {
+ gst_object_unref (pad);
return TRUE;
+ }
othercaps = gst_caps_intersect (peercaps,
gst_pad_get_pad_template_caps (pad));
@@ -451,6 +455,7 @@ same_clock_rate_fold (gpointer item, GValue * ret, gpointer user_data)
g_value_take_boxed (ret, intersect);
gst_caps_unref (othercaps);
+ gst_object_unref (pad);
return !gst_caps_is_empty (intersect);
}