update for memory api changes
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 15 Mar 2012 12:37:36 +0000 (13:37 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 15 Mar 2012 12:37:36 +0000 (13:37 +0100)
gst/dtmf/gstdtmfsrc.c
gst/dtmf/gstrtpdtmfdepay.c

index b3f24ff..60bc8a5 100644 (file)
@@ -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, &params);
 
   gst_buffer_map (buffer, &map, GST_MAP_READWRITE);
   p = (gint16 *) map.data;
index db4d6fb..0dda885 100644 (file)
@@ -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, &params);
   GST_BUFFER_DURATION (buf) = payload.duration * GST_SECOND / clock_rate;
   volume = payload.volume;