rtpamrdepay: unmap rtp buffer
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 7 Sep 2012 13:23:44 +0000 (15:23 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 7 Sep 2012 13:25:53 +0000 (15:25 +0200)
... thereby plugging a memleak.

gst/rtp/gstrtpamrdepay.c

index d870e92..5c7098a 100644 (file)
@@ -413,6 +413,8 @@ gst_rtp_amr_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
     GST_DEBUG_OBJECT (depayload, "pushing buffer of size %" G_GSIZE_FORMAT,
         gst_buffer_get_size (outbuf));
   }
+
+  gst_rtp_buffer_unmap (&rtp);
   return outbuf;
 
   /* ERRORS */
@@ -449,6 +451,7 @@ wrong_length_2:
 bad_packet:
   {
     /* no fatal error */
+    gst_rtp_buffer_unmap (&rtp);
     return NULL;
   }
 }