diff --git a/ChangeLog b/ChangeLog index 222db6b248..872ed26834 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-11 Tim-Philipp Müller + + * 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 * ext/libpng/gstpngdec.c: (gst_pngdec_init), diff --git a/gst/rtp/gstrtpmp4vdepay.c b/gst/rtp/gstrtpmp4vdepay.c index fe0b4e5a1d..5106916a92 100644 --- a/gst/rtp/gstrtpmp4vdepay.c +++ b/gst/rtp/gstrtpmp4vdepay.c @@ -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);