mpegtsparse: fix handling of TOT and TDT sections. Fixes #635281.

TDT and TOT sections, with PID=0x14, doesn't extend to several packets
and the section filter is not needed here and shouldn't be used at all
for these tables because the have a different structure.
For example, TDT tables were not parsed for odd hours because this bit
is the 'current_next_indicator' bit for the other sections, and the table
was discarded.
This commit is contained in:
Andoni Morales Alastruey 2010-11-19 17:25:01 +01:00 committed by Alessandro Decina
parent 2611b12970
commit b11f737096

View file

@ -2197,6 +2197,21 @@ mpegts_packetizer_push_section (MpegTSPacketizer * packetizer,
sub_buf = gst_buffer_create_sub (packet->buffer,
data - GST_BUFFER_DATA (packet->buffer), packet->data_end - data);
/* TDT and TOT sections (see ETSI EN 300 468 5.2.5)
* these sections do not extend to several packets so we don't need to use the
* sections filter. */
if (packet->pid == 0x14) {
table_id = *data++;
section->section_length = GST_READ_UINT16_BE (data) & 0x0FFF;
section->buffer = sub_buf;
section->table_id = table_id;
section->complete = TRUE;
res = TRUE;
GST_DEBUG ("TDT section pid:%d table_id:%d section_length: %d\n",
packet->pid, table_id, section_length);
goto out;
}
stream = packetizer->streams[packet->pid];
if (stream == NULL) {
stream = mpegts_packetizer_stream_new ();