summaryrefslogtreecommitdiff
path: root/ext/flite/gstflitetestsrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/flite/gstflitetestsrc.c')
-rw-r--r--ext/flite/gstflitetestsrc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/flite/gstflitetestsrc.c b/ext/flite/gstflitetestsrc.c
index c31fb96dc..0c9118b9c 100644
--- a/ext/flite/gstflitetestsrc.c
+++ b/ext/flite/gstflitetestsrc.c
@@ -444,6 +444,7 @@ gst_flite_test_src_create (GstBaseSrc * basesrc, guint64 offset,
GstBuffer *buf;
char *text;
int i;
+ GstMapInfo map;
gint16 *data;
cst_wave *wave;
gsize size;
@@ -460,12 +461,13 @@ gst_flite_test_src_create (GstBaseSrc * basesrc, guint64 offset,
size = src->info.channels * sizeof (gint16) * wave->num_samples;
buf = gst_buffer_new_and_alloc (size);
- data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
+ gst_buffer_map (buf, &map, GST_MAP_WRITE);
+ data = (gint16 *) map.data;
memset (data, 0, size);
for (i = 0; i < wave->num_samples; i++) {
data[i * src->info.channels + src->channel] = wave->samples[i];
}
- gst_buffer_unmap (buf, data, size);
+ gst_buffer_unmap (buf, &map);
src->channel++;
if (src->channel == src->info.channels) {