mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
mpegts: Handle "empty" PMT gracefully
Some streams have 2 PMT sections in a single TS packet. The first one is "valid" but doesn't contain/define any streams. That causes an unrecoverable issue when we try to activate the 2nd (valid) PMT. Instead of doing that, pre-emptively refuse to process PMT without any streams present within. We still do post that section on the bus to inform applications. Fixes #1181 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2310>
This commit is contained in:
parent
853963ba21
commit
10f72da504
1 changed files with 6 additions and 0 deletions
|
@ -1190,6 +1190,12 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* Don't attempt to handle pmt without any streams */
|
||||
if (G_UNLIKELY (pmt->streams->len == 0)) {
|
||||
GST_WARNING ("Skipping PMT without any entries");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
program_number = section->subtable_extension;
|
||||
GST_DEBUG ("Applying PMT (program_number:%d, pid:0x%04x)",
|
||||
program_number, section->pid);
|
||||
|
|
Loading…
Reference in a new issue