mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-21 06:38:19 +00:00
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.
This commit is contained in:
parent
95bc489351
commit
8774ebf733
2 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-07-10 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* gst/mpegtsparse/mpegtspacketizer.c:
|
||||
Convert extended event text to UTF-8.
|
||||
|
||||
2008-07-10 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/plugins/Makefile.am:
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue