summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorZaheer Abbas Merali <zaheerabbas@merali.org>2008-07-10 20:23:09 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2008-07-10 20:23:09 +0000
commit8774ebf733ec24d08b567aaad5806baddda0badf (patch)
tree9d771dd7081cc3b5dbdaac525e13a141595f144e /gst
parent95bc489351ed0985aab4f775a09d345ebdd11b73 (diff)
downloadgst-plugins-bad-8774ebf733ec24d08b567aaad5806baddda0badf.tar.gz
gst-plugins-bad-8774ebf733ec24d08b567aaad5806baddda0badf.tar.bz2
gst-plugins-bad-8774ebf733ec24d08b567aaad5806baddda0badf.zip
gst/mpegtsparse/mpegtspacketizer.c: Convert extended event text to UTF-8.
Original commit message from CVS: * gst/mpegtsparse/mpegtspacketizer.c: Convert extended event text to UTF-8.
Diffstat (limited to 'gst')
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index 99d04c72..ce4a644a 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -1,8 +1,9 @@
/*
* mpegtspacketizer.c -
- * Copyright (C) 2007 Alessandro Decina
+ * Copyright (C) 2007, 2008 Alessandro Decina, Zaheer Merali
*
* Authors:
+ * Zaheer Merali <zaheerabbas at merali dot org>
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
@@ -21,6 +22,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
+
#include "mpegtspacketizer.h"
#include "gstmpegdesc.h"
@@ -1465,6 +1468,7 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
guint8 *extended_descriptor;
/*GValue extended_items = { 0 }; */
gchar *extended_text = NULL;
+ gchar *extended_text_tmp;
/*g_value_init (&extended_items, GST_TYPE_LIST); */
for (i = 0; i < extended_event_descriptors->len; i++) {
extended_descriptor = g_array_index (extended_event_descriptors,
@@ -1474,24 +1478,26 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
if (extended_text) {
gchar *tmp;
gchar *old_extended_text = extended_text;
- tmp =
- g_strndup ((gchar *)
+ tmp = g_strndup ((gchar *)
DESC_DVB_EXTENDED_EVENT_text (extended_descriptor),
DESC_DVB_EXTENDED_EVENT_text_length (extended_descriptor));
extended_text = g_strdup_printf ("%s%s", extended_text, tmp);
g_free (old_extended_text);
g_free (tmp);
} else {
- extended_text =
- g_strndup ((gchar *)
+ extended_text = g_strndup ((gchar *)
DESC_DVB_EXTENDED_EVENT_text (extended_descriptor),
DESC_DVB_EXTENDED_EVENT_text_length (extended_descriptor));
}
}
}
if (extended_text) {
+ extended_text_tmp = get_encoding_and_convert (extended_text,
+ strlen (extended_text));
+
gst_structure_set (event, "extended-text", G_TYPE_STRING,
- extended_text, NULL);
+ extended_text_tmp, NULL);
+ g_free (extended_text_tmp);
g_free (extended_text);
}
g_array_free (extended_event_descriptors, TRUE);