summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/audioresample/gstaudioresample.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c
index 16c01a79..e907dbfa 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);
}