mpegts: Correctly check for PAT,PMT,CAT,TSDT

This commit is contained in:
Jesper Larsen 2014-02-08 17:43:03 +01:00 committed by Sebastian Dröge
parent 972f7ea71f
commit f1c8de4bc2

View file

@ -1087,14 +1087,18 @@ _packetize_common_section (GstMpegTsSection * section, gsize length)
/* section_syntax_indicator - 1 bit /* section_syntax_indicator - 1 bit
reserved - 3 bit reserved - 3 bit
section_length - 12 bit uimsbf */ section_length - 12 bit uimsbf */
if (section->section_type == (GST_MPEGTS_SECTION_PAT || switch (section->section_type) {
GST_MPEGTS_SECTION_PMT || case GST_MPEGTS_SECTION_PAT:
GST_MPEGTS_SECTION_CAT || GST_MPEGTS_SECTION_TSDT)) { case GST_MPEGTS_SECTION_PMT:
/* Tables from ISO/IEC 13818-1 has a '0' bit case GST_MPEGTS_SECTION_CAT:
* after the section_syntax_indicator */ case GST_MPEGTS_SECTION_TSDT:
GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x3000); /* Tables from ISO/IEC 13818-1 has a '0' bit
} else * after the section_syntax_indicator */
GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x7000); GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x3000);
break;
default:
GST_WRITE_UINT16_BE (data, (section->section_length - 3) | 0x7000);
}
if (!section->short_section) if (!section->short_section)
*data |= 0x80; *data |= 0x80;