From 2f47105129c65f415331aa0efb8d93ff8b647504 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 29 Jun 2014 23:55:19 +0200 Subject: [PATCH] rtpbin: Don't leak caps --- gst/rtpmanager/gstrtpbin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 9cc7d6e..9b1b86a 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -2813,8 +2813,10 @@ caps_changed (GstPad * pad, GParamSpec * pspec, GstRtpBinSession * session) s = gst_caps_get_structure (caps, 0); /* get payload, finish when it's not there */ - if (!gst_structure_get_int (s, "payload", &payload)) + if (!gst_structure_get_int (s, "payload", &payload)) { + gst_caps_unref (caps); return; + } GST_RTP_SESSION_LOCK (session); GST_DEBUG_OBJECT (bin, "insert caps for payload %d", payload); -- 2.7.4