rtpmp4apay,rtpmp4depay: fix buffer leaks in AAC payloader and depayloader
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 25 Mar 2009 01:28:38 +0000 (01:28 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 25 Mar 2009 10:36:49 +0000 (10:36 +0000)
gst/rtp/gstrtpmp4adepay.c
gst/rtp/gstrtpmp4apay.c

index cb8735d06024860ef743b35d54e840c93e18a7d4..15dfb0dcabfcea5b394a5a56d6d87340ab3573c3 100644 (file)
@@ -316,6 +316,8 @@ gst_rtp_mp4a_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
           ("Packet invalid"), ("Not all payload consumed: "
               "possible wrongly encoded packet."));
     }
+
+    gst_buffer_unref (outbuf);
   }
   return NULL;
 
@@ -324,6 +326,7 @@ wrong_size:
   {
     GST_ELEMENT_WARNING (rtpmp4adepay, STREAM, DECODE,
         ("Packet did not validate"), ("wrong packet size"));
+    gst_buffer_unref (outbuf);
     return NULL;
   }
 }
index 6d18bd06f371756ddeb85917e289e3b6abe6a648..f4c9d255a2dad69d7690c90b0caff740bbc6ed0e 100644 (file)
@@ -447,6 +447,9 @@ gst_rtp_mp4a_pay_handle_buffer (GstBaseRTPPayload * basepayload,
 
     fragmented = TRUE;
   }
+
+  gst_buffer_unref (buffer);
+
   return ret;
 }