rtpmp4vdepay: fix buffer leak
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 2 Aug 2010 10:46:41 +0000 (12:46 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 2 Aug 2010 11:04:39 +0000 (13:04 +0200)
gst/rtp/gstrtpmp4vdepay.c

index 04a1442..c1c911a 100644 (file)
@@ -152,11 +152,10 @@ gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
       GstBuffer *buffer;
 
       buffer = gst_value_get_buffer (&v);
-      gst_buffer_ref (buffer);
-      g_value_unset (&v);
-
       gst_caps_set_simple (srccaps,
           "codec_data", GST_TYPE_BUFFER, buffer, NULL);
+      /* caps takes ref */
+      g_value_unset (&v);
     } else {
       g_warning ("cannot convert config to buffer");
     }