rtpbin: Don't leak caps
authorSebastian Dröge <sebastian@centricular.com>
Sun, 29 Jun 2014 21:55:19 +0000 (23:55 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 29 Jun 2014 21:55:19 +0000 (23:55 +0200)
gst/rtpmanager/gstrtpbin.c

index 9cc7d6e..9b1b86a 100644 (file)
@@ -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);