mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
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.
This commit is contained in:
parent
a5bf402c55
commit
a65390d31a
3 changed files with 18 additions and 11 deletions
10
ChangeLog
10
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:
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue