gst/rtp/gstrtpmp4vdepay.c: Don't leak memory allocated by gst_buffer_new_and_alloc() by overwriting GST_BUFFER_MALLOC...

Original commit message from CVS:
* gst/rtp/gstrtpmp4vdepay.c: (gst_rtp_mp4v_depay_process):
Don't leak memory allocated by gst_buffer_new_and_alloc() by
overwriting GST_BUFFER_MALLOCDATA.
This commit is contained in:
Tim-Philipp Müller 2006-04-11 18:03:36 +00:00
parent ea46530357
commit f90f5bd8bf
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-04-11 Tim-Philipp Müller <tim at centricular dot net>
* gst/rtp/gstrtpmp4vdepay.c: (gst_rtp_mp4v_depay_process):
Don't leak memory allocated by gst_buffer_new_and_alloc() by
overwriting GST_BUFFER_MALLOCDATA.
2006-04-11 Tim-Philipp Müller <tim at centricular dot net>
* ext/libpng/gstpngdec.c: (gst_pngdec_init),

View file

@ -203,8 +203,8 @@ gst_rtp_mp4v_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
avail = gst_adapter_available (rtpmp4vdepay->adapter);
outbuf = gst_buffer_new_and_alloc (avail);
outbuf = gst_buffer_new ();
GST_BUFFER_SIZE (outbuf) = avail;
GST_BUFFER_MALLOCDATA (outbuf) =
gst_adapter_take (rtpmp4vdepay->adapter, avail);
GST_BUFFER_DATA (outbuf) = GST_BUFFER_MALLOCDATA (outbuf);