mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mpegts: Correctly check for PAT,PMT,CAT,TSDT
This commit is contained in:
parent
972f7ea71f
commit
f1c8de4bc2
1 changed files with 12 additions and 8 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue