mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
rtpmux: Fix leak
Fixed a leak discovered by Laurent Glayal <spegle@yahoo.fr>
This commit is contained in:
parent
905aad3572
commit
6c4eeff781
1 changed files with 7 additions and 2 deletions
|
@ -431,12 +431,16 @@ same_clock_rate_fold (gpointer item, GValue * ret, gpointer user_data)
|
||||||
const GstCaps *accumcaps;
|
const GstCaps *accumcaps;
|
||||||
GstCaps *intersect;
|
GstCaps *intersect;
|
||||||
|
|
||||||
if (pad == mypad)
|
if (pad == mypad) {
|
||||||
|
gst_object_unref (pad);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
peercaps = gst_pad_peer_get_caps (pad);
|
peercaps = gst_pad_peer_get_caps (pad);
|
||||||
if (!peercaps)
|
if (!peercaps) {
|
||||||
|
gst_object_unref (pad);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
othercaps = gst_caps_intersect (peercaps,
|
othercaps = gst_caps_intersect (peercaps,
|
||||||
gst_pad_get_pad_template_caps (pad));
|
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);
|
g_value_take_boxed (ret, intersect);
|
||||||
|
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
|
gst_object_unref (pad);
|
||||||
|
|
||||||
return !gst_caps_is_empty (intersect);
|
return !gst_caps_is_empty (intersect);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue