summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-section.c1
-rw-r--r--tests/examples/mpegts/ts-parser.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/gst-libs/gst/mpegts/gst-dvb-section.c b/gst-libs/gst/mpegts/gst-dvb-section.c
index 7626caf25..fe3d09f43 100644
--- a/gst-libs/gst/mpegts/gst-dvb-section.c
+++ b/gst-libs/gst/mpegts/gst-dvb-section.c
@@ -739,6 +739,7 @@ _parse_tot (GstMpegTsSection * section)
data = section->data + 8;
desc_len = GST_READ_UINT16_BE (data) & 0xFFF;
+ data += 2;
tot->descriptors = gst_mpegts_parse_descriptors (data, desc_len);
return tot;
diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c
index f878a9037..db422b3d8 100644
--- a/tests/examples/mpegts/ts-parser.c
+++ b/tests/examples/mpegts/ts-parser.c
@@ -327,6 +327,17 @@ dump_tdt (GstMpegTsSection * section)
}
static void
+dump_tot (GstMpegTsSection * section)
+{
+ const GstMpegTsTOT *tot = gst_mpegts_section_get_tot (section);
+ gchar *str = gst_date_time_to_iso8601_string (tot->utc_time);
+
+ g_printf (" utc_time : %s\n", str);
+ dump_descriptors (tot->descriptors, 7);
+ g_free (str);
+}
+
+static void
dump_section (GstMpegTsSection * section)
{
switch (GST_MPEGTS_SECTION_TYPE (section)) {
@@ -339,6 +350,9 @@ dump_section (GstMpegTsSection * section)
case GST_MPEGTS_SECTION_TDT:
dump_tdt (section);
break;
+ case GST_MPEGTS_SECTION_TOT:
+ dump_tot (section);
+ break;
case GST_MPEGTS_SECTION_SDT:
dump_sdt (section);
break;