mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-03-09 23:11:18 +00:00
mpegtslivesrc: Ignore NIT programs from the PAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2102>
This commit is contained in:
parent
a34efda201
commit
3d384bff62
1 changed files with 7 additions and 3 deletions
|
@ -420,10 +420,13 @@ impl State {
|
|||
"Parsed PAT: {table_header:?} {table_syntax_section:?} {pat:?}"
|
||||
);
|
||||
|
||||
if pat.is_empty() {
|
||||
// Program number 0 is reserved for the NIT
|
||||
let num_non_nit_pats =
|
||||
pat.iter().filter(|pat| pat.program_num != 0).count();
|
||||
if num_non_nit_pats == 0 {
|
||||
gst::warning!(CAT, imp = imp, "No programs in PAT");
|
||||
continue;
|
||||
} else if pat.len() > 1 {
|
||||
} else if num_non_nit_pats > 1 {
|
||||
gst::warning!(
|
||||
CAT,
|
||||
imp = imp,
|
||||
|
@ -431,7 +434,8 @@ impl State {
|
|||
);
|
||||
}
|
||||
|
||||
let selected_pat = &pat[0];
|
||||
// Get first non-NIT program here and select that
|
||||
let selected_pat = pat.iter().find(|pat| pat.program_num != 0).unwrap();
|
||||
if header.pid == 0x00_00 && Some(selected_pat) != self.pat.as_ref() {
|
||||
gst::trace!(
|
||||
CAT,
|
||||
|
|
Loading…
Reference in a new issue