From 04a91237f31a5bf6846a5527f30597a7df492ad1 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 15 Mar 2012 13:37:36 +0100 Subject: [PATCH] update for memory api changes --- gst/dtmf/gstdtmfsrc.c | 3 ++- gst/dtmf/gstrtpdtmfdepay.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index b3f24ffda1..60bc8a5e92 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -547,11 +547,12 @@ gst_dtmf_src_generate_tone (GstDTMFSrcEvent * event, DTMF_KEY key, double i = 0; double amplitude, f1, f2; double volume_factor; + static GstAllocationParams params = { 0, 0, 0, 1, }; /* Create a buffer for the tone */ tone_size = ((duration / 1000) * sample_rate * SAMPLE_SIZE * CHANNELS) / 8; - buffer = gst_buffer_new_allocate (NULL, tone_size, 1); + buffer = gst_buffer_new_allocate (NULL, tone_size, ¶ms); gst_buffer_map (buffer, &map, GST_MAP_READWRITE); p = (gint16 *) map.data; diff --git a/gst/dtmf/gstrtpdtmfdepay.c b/gst/dtmf/gstrtpdtmfdepay.c index db4d6fb324..0dda885013 100644 --- a/gst/dtmf/gstrtpdtmfdepay.c +++ b/gst/dtmf/gstrtpdtmfdepay.c @@ -342,12 +342,13 @@ gst_dtmf_src_generate_tone (GstRtpDTMFDepay * rtpdtmfdepay, guint32 clock_rate = 8000 /* default */ ; GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtpdtmfdepay); gint volume; + static GstAllocationParams params = { 0, 0, 0, 1, }; clock_rate = depayload->clock_rate; /* Create a buffer for the tone */ tone_size = (payload.duration * SAMPLE_SIZE * CHANNELS) / 8; - buf = gst_buffer_new_allocate (NULL, tone_size, 1); + buf = gst_buffer_new_allocate (NULL, tone_size, ¶ms); GST_BUFFER_DURATION (buf) = payload.duration * GST_SECOND / clock_rate; volume = payload.volume;