mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
mpegtsdemux: Restore erroneously removed data++
Also, put back some unused code in comment and replace // comments by /* */
This commit is contained in:
parent
ad97807497
commit
ca7a512739
1 changed files with 12 additions and 6 deletions
|
@ -384,6 +384,7 @@ mpegts_packetizer_parse_descriptors (MpegTSPacketizer2 * packetizer,
|
||||||
data = *buffer;
|
data = *buffer;
|
||||||
|
|
||||||
while (data < buffer_end) {
|
while (data < buffer_end) {
|
||||||
|
data++; /* skip tag */
|
||||||
length = *data++;
|
length = *data++;
|
||||||
|
|
||||||
if (data + length > buffer_end) {
|
if (data + length > buffer_end) {
|
||||||
|
@ -1404,6 +1405,9 @@ mpegts_packetizer_parse_sdt (MpegTSPacketizer2 * packetizer,
|
||||||
service_id = GST_READ_UINT16_BE (data);
|
service_id = GST_READ_UINT16_BE (data);
|
||||||
data += 2;
|
data += 2;
|
||||||
|
|
||||||
|
/* EIT_schedule = ((*data & 0x02) == 2); */
|
||||||
|
/* EIT_present_following = (*data & 0x01) == 1; */
|
||||||
|
|
||||||
data += 1;
|
data += 1;
|
||||||
tmp = GST_READ_UINT16_BE (data);
|
tmp = GST_READ_UINT16_BE (data);
|
||||||
|
|
||||||
|
@ -1610,6 +1614,7 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
|
||||||
|
|
||||||
event_id = GST_READ_UINT16_BE (data);
|
event_id = GST_READ_UINT16_BE (data);
|
||||||
data += 2;
|
data += 2;
|
||||||
|
/* start_and_duration = GST_READ_UINT64_BE (data); */
|
||||||
duration_ptr = data + 5;
|
duration_ptr = data + 5;
|
||||||
utc_ptr = data + 2;
|
utc_ptr = data + 2;
|
||||||
mjd = GST_READ_UINT16_BE (data);
|
mjd = GST_READ_UINT16_BE (data);
|
||||||
|
@ -2514,14 +2519,15 @@ get_encoding (const gchar * text, guint * start_text, gboolean * is_multibyte)
|
||||||
*start_text = 1;
|
*start_text = 1;
|
||||||
*is_multibyte = TRUE;
|
*is_multibyte = TRUE;
|
||||||
} else if (firstbyte == 0x12) {
|
} else if (firstbyte == 0x12) {
|
||||||
// That's korean encoding.
|
/* That's korean encoding.
|
||||||
// The spec says it's encoded in KSC 5601, but iconv only knows KSC 5636.
|
* The spec says it's encoded in KSC 5601, but iconv only knows KSC 5636.
|
||||||
// Couldn't find any information about either of them.
|
* Couldn't find any information about either of them.
|
||||||
|
*/
|
||||||
encoding = NULL;
|
encoding = NULL;
|
||||||
*start_text = 1;
|
*start_text = 1;
|
||||||
*is_multibyte = TRUE;
|
*is_multibyte = TRUE;
|
||||||
} else {
|
} else {
|
||||||
// reserved
|
/* reserved */
|
||||||
encoding = NULL;
|
encoding = NULL;
|
||||||
*start_text = 0;
|
*start_text = 0;
|
||||||
*is_multibyte = FALSE;
|
*is_multibyte = FALSE;
|
||||||
|
@ -2571,7 +2577,7 @@ convert_to_utf8 (const gchar * text, gint length, guint start,
|
||||||
/* skip it */
|
/* skip it */
|
||||||
break;
|
break;
|
||||||
case 0xE08A:{
|
case 0xE08A:{
|
||||||
guint8 nl[] = { 0x0A, 0x00 }; // new line
|
guint8 nl[] = { 0x0A, 0x00 }; /* new line */
|
||||||
g_byte_array_append (sb, nl, 2);
|
g_byte_array_append (sb, nl, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2592,7 +2598,7 @@ convert_to_utf8 (const gchar * text, gint length, guint start,
|
||||||
/* skip it */
|
/* skip it */
|
||||||
break;
|
break;
|
||||||
case 0xE08A:{
|
case 0xE08A:{
|
||||||
guint8 nl[] = { 0x0A, 0x00 }; // new line
|
guint8 nl[] = { 0x0A, 0x00 }; /* new line */
|
||||||
g_byte_array_append (sb, nl, 2);
|
g_byte_array_append (sb, nl, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue