From a3853fad025b2ca3ffc7b34ac054fa8700dfb982 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 15 Dec 2005 10:30:14 +0000 Subject: [PATCH] gst/audioresample/gstaudioresample.c: Don't leak all input buffers to audioresample. Original commit message from CVS: * gst/audioresample/gstaudioresample.c: Don't leak all input buffers to audioresample. --- ChangeLog | 5 +++++ gst/audioresample/gstaudioresample.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4be0111239..763086b69d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-15 Michael Smith + + * gst/audioresample/gstaudioresample.c: + Don't leak all input buffers to audioresample. + 2005-12-15 Tim-Philipp Müller * ext/pango/gsttextoverlay.c: (gst_text_overlay_collected): diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index 16c01a79dd..e907dbfae0 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -480,7 +480,7 @@ static GstFlowReturn { GstAudioresample *audioresample; ResampleState *r; - guchar *data; + guchar *data, *datacopy; gulong size; GstClockTime timestamp; @@ -514,7 +514,8 @@ static GstFlowReturn } /* need to memdup, resample takes ownership. */ - resample_add_input_data (r, g_memdup (data, size), size, NULL, NULL); + datacopy = g_memdup (data, size); + resample_add_input_data (r, datacopy, size, g_free, datacopy); return audioresample_do_output (audioresample, outbuf); }