mpegdemux: Restore erroneously removed data++
authorOlivier Crête <olivier.crete@collabora.com>
Wed, 13 Jul 2011 17:38:31 +0000 (13:38 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 13 Jul 2011 17:38:31 +0000 (13:38 -0400)
Also, put back some unused code in comment and replace // comments by /* */

gst/mpegdemux/mpegtspacketizer.c

index 83e89ac93d5680c4f589a1ba5b93c0283e197dd7..a9a69c9d3caea96ad902eb95fd643fdae7b312a9 100644 (file)
@@ -344,6 +344,7 @@ mpegts_packetizer_parse_descriptors (MpegTSPacketizer * packetizer,
   data = *buffer;
 
   while (data < buffer_end) {
+    data++;                     /* skip tag */
     length = *data++;
 
     if (data + length > buffer_end) {
@@ -1354,6 +1355,9 @@ mpegts_packetizer_parse_sdt (MpegTSPacketizer * packetizer,
     service_id = GST_READ_UINT16_BE (data);
     data += 2;
 
+    /* EIT_schedule = ((*data & 0x02) == 2); */
+    /* EIT_present_following = (*data & 0x01) == 1; */
+
     data += 1;
     tmp = GST_READ_UINT16_BE (data);
 
@@ -1560,6 +1564,7 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
 
     event_id = GST_READ_UINT16_BE (data);
     data += 2;
+    /* start_and_duration = GST_READ_UINT64_BE (data); */
     duration_ptr = data + 5;
     utc_ptr = data + 2;
     mjd = GST_READ_UINT16_BE (data);
@@ -1703,7 +1708,7 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
           GValue component_value = { 0 };
           gint widescreen = 0;  /* 0 for 4:3, 1 for 16:9, 2 for > 16:9 */
           gint freq = 25;       /* 25 or 30 measured in Hertz */
-          //gboolean highdef = FALSE;
+          /* gboolean highdef = FALSE; */
           gboolean panvectors = FALSE;
           const gchar *comptype = "";
 
@@ -1750,46 +1755,46 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer * packetizer,
                   break;
                 case 0x09:
                   widescreen = 0;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   freq = 25;
                   break;
                 case 0x0A:
                   widescreen = 1;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   panvectors = TRUE;
                   freq = 25;
                   break;
                 case 0x0B:
                   widescreen = 1;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   panvectors = FALSE;
                   freq = 25;
                   break;
                 case 0x0C:
                   widescreen = 2;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   freq = 25;
                   break;
                 case 0x0D:
                   widescreen = 0;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   freq = 30;
                   break;
                 case 0x0E:
                   widescreen = 1;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   panvectors = TRUE;
                   freq = 30;
                   break;
                 case 0x0F:
                   widescreen = 1;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   panvectors = FALSE;
                   freq = 30;
                   break;
                 case 0x10:
                   widescreen = 2;
-                  //highdef = TRUE;
+                  /* highdef = TRUE; */
                   freq = 30;
                   break;
               }
@@ -2379,14 +2384,15 @@ get_encoding (const gchar * text, guint * start_text, gboolean * is_multibyte)
     *start_text = 1;
     *is_multibyte = TRUE;
   } else if (firstbyte == 0x12) {
-    // That's korean encoding.
-    // The spec says it's encoded in KSC 5601, but iconv only knows KSC 5636.
-    // Couldn't find any information about either of them.
+    /* That's korean encoding.
+     * The spec says it's encoded in KSC 5601, but iconv only knows KSC 5636.
+     * Couldn't find any information about either of them.
+     */
     encoding = NULL;
     *start_text = 1;
     *is_multibyte = TRUE;
   } else {
-    // reserved
+    /* reserved */
     encoding = NULL;
     *start_text = 0;
     *is_multibyte = FALSE;
@@ -2436,7 +2442,7 @@ convert_to_utf8 (const gchar * text, gint length, guint start,
             /* skip it */
             break;
           case 0xE08A:{
-            guint8 nl[] = { 0x0A, 0x00 };       // new line
+            guint8 nl[] = { 0x0A, 0x00 };       /* new line */
             g_byte_array_append (sb, nl, 2);
             break;
           }
@@ -2457,7 +2463,7 @@ convert_to_utf8 (const gchar * text, gint length, guint start,
             /* skip it */
             break;
           case 0xE08A:{
-            guint8 nl[] = { 0x0A, 0x00 };       // new line
+            guint8 nl[] = { 0x0A, 0x00 };       /* new line */
             g_byte_array_append (sb, nl, 2);
             break;
           }