From 29092cc3b8d339c1f38c4fda95cca23c60bf1586 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 Jul 2012 12:10:28 +0200 Subject: [PATCH] festival: unmap input buffer --- gst/festival/gstfestival.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index 075df746a0..faced1f873 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -171,7 +171,7 @@ G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT) gst_element_class_set_details_simple (gstelement_class, "Festival Text-to-Speech synthesizer", "Filter/Effect/Audio", "Synthesizes plain text into audio", - "Wim Taymans "); + "Wim Taymans "); } static void @@ -283,9 +283,9 @@ gst_festival_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) } fprintf (fd, "(tts_textall \""); - gst_buffer_map (buf, &info, GST_MAP_WRITE); + gst_buffer_map (buf, &info, GST_MAP_READ); p = info.data; - ep = p + gst_buffer_get_size (buf); + ep = p + info.size; for (; p < ep && (*p != '\0'); p++) { if ((*p == '"') || (*p == '\\')) { putc ('\\', fd); @@ -295,6 +295,7 @@ gst_festival_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) } fprintf (fd, "\" \"%s\")\n", festival->info->text_mode); fclose (fd); + gst_buffer_unmap (buf, &info); GST_DEBUG_OBJECT (festival, "issued tts_textall command");