summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Pölsterl <marduk@k-d-w.org>2008-11-05 18:11:55 +0000
committerZaheer Abbas Merali <zaheerabbas@merali.org>2008-11-05 18:11:55 +0000
commita65390d31ac978155e35890f70e7a4655d6deb8d (patch)
treec9dff4475186fd86e87b4c3a863ea7851f31a11a
parenta5bf402c557ad3b908b253e87a7f6c4b437b5a0c (diff)
downloadgst-plugins-bad-a65390d31ac978155e35890f70e7a4655d6deb8d.tar.gz
gst-plugins-bad-a65390d31ac978155e35890f70e7a4655d6deb8d.tar.bz2
gst-plugins-bad-a65390d31ac978155e35890f70e7a4655d6deb8d.zip
gst/mpegdemux/gstmpegdesc.c: Length should be a guint8 not a gint.
Original commit message from CVS: patch by: Sebastian Pölsterl * gst/mpegdemux/gstmpegdesc.c: Length should be a guint8 not a gint. * gst/mpegdemux/mpegtspacketizer.c: Convert text to utf8 for each descriptor separately and not concatenate them first and convert after.
-rw-r--r--ChangeLog10
-rw-r--r--gst/mpegdemux/gstmpegdesc.c8
-rw-r--r--gst/mpegdemux/mpegtspacketizer.c11
3 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index af99c2a9..301e66c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-11-05 Zaheer Abbas Merali <zaheerabbas at merali dot org>
+
+ patch by: Sebastian Pölsterl
+
+ * gst/mpegdemux/gstmpegdesc.c:
+ Length should be a guint8 not a gint.
+ * gst/mpegdemux/mpegtspacketizer.c:
+ Convert text to utf8 for each descriptor separately and not
+ concatenate them first and convert after.
+
2008-11-04 Stefan Kost <ensonic@users.sf.net>
* gst/modplug/gstmodplug.cc:
diff --git a/gst/mpegdemux/gstmpegdesc.c b/gst/mpegdemux/gstmpegdesc.c
index 727b3e8a..4c88e1fd 100644
--- a/gst/mpegdemux/gstmpegdesc.c
+++ b/gst/mpegdemux/gstmpegdesc.c
@@ -119,7 +119,7 @@ gst_mpeg_descriptor_n_desc (GstMPEGDescriptor * desc)
guint8 *
gst_mpeg_descriptor_find (GstMPEGDescriptor * desc, gint tag)
{
- gint length;
+ guint8 length;
guint8 *current;
guint size;
@@ -146,7 +146,7 @@ gst_mpeg_descriptor_find_all (GstMPEGDescriptor * desc, gint tag)
{
GArray *all;
- gint length;
+ guint8 length;
guint8 *current;
guint size;
@@ -165,13 +165,15 @@ gst_mpeg_descriptor_find_all (GstMPEGDescriptor * desc, gint tag)
length -= size;
}
+ GST_DEBUG ("found tag 0x%02x %d times", tag, all->len);
+
return all;
}
guint8 *
gst_mpeg_descriptor_nth (GstMPEGDescriptor * desc, guint i)
{
- gint length;
+ guint8 length;
guint8 *current;
guint size;
diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c
index 4f06e99f..8c5fcc9c 100644
--- a/gst/mpegdemux/mpegtspacketizer.c
+++ b/gst/mpegdemux/mpegtspacketizer.c
@@ -1545,7 +1545,6 @@ 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,
@@ -1555,26 +1554,22 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
if (extended_text) {
gchar *tmp;
gchar *old_extended_text = extended_text;
- tmp = g_strndup ((gchar *)
+ tmp = get_encoding_and_convert ((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 = get_encoding_and_convert ((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_tmp, NULL);
- g_free (extended_text_tmp);
+ extended_text, NULL);
g_free (extended_text);
}
g_array_free (extended_event_descriptors, TRUE);