From 73663d735221608a220d06213299b5bbdf404401 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 16 Dec 2024 04:33:01 +0100 Subject: [PATCH] cea708mux: Don't push empty services into packets This is invalid. Only "padding" service 0 can be empty. Part-of: --- video/closedcaption/src/cea708mux/imp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/closedcaption/src/cea708mux/imp.rs b/video/closedcaption/src/cea708mux/imp.rs index 92469b20..1f89208d 100644 --- a/video/closedcaption/src/cea708mux/imp.rs +++ b/video/closedcaption/src/cea708mux/imp.rs @@ -348,7 +348,7 @@ impl AggregatorImpl for Cea708Mux { let mut packet = DTVCCPacket::new(state.dtvcc_seq_no & 0x3); state.dtvcc_seq_no = state.dtvcc_seq_no.wrapping_add(1); - for (_service_no, service) in services.into_iter() { + for (_service_no, service) in services.into_iter().filter(|(_, s)| !s.codes().is_empty()) { // FIXME: handle needing to split services gst::trace!( CAT,