diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-10-26 20:20:27 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-10-27 15:35:17 +0300 |
commit | 51ff0992215a2a9c16a6b34ea4da2fa45faaf03a (patch) | |
tree | 573247db65e93a12a9b83d20d13284ae77707245 /mux | |
parent | eefa8540ba04afbdd8a55d3f011fed7a1b88ec45 (diff) |
fmp4mux: Reset timing infos to None if a stream only contained gap events for a whole fragment
Diffstat (limited to 'mux')
-rw-r--r-- | mux/fmp4/src/fmp4mux/imp.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs index 22e9bf19..ef2a9ae8 100644 --- a/mux/fmp4/src/fmp4mux/imp.rs +++ b/mux/fmp4/src/fmp4mux/imp.rs @@ -1239,12 +1239,16 @@ impl FMP4Mux { ) = self.drain_buffers(state, settings, timeout, at_eos)?; // Remove all GAP buffers before processing them further - for (_, _, buffers) in &mut drained_streams { + for (_, timing_info, buffers) in &mut drained_streams { buffers.retain(|buf| { !buf.buffer.flags().contains(gst::BufferFlags::GAP) || !buf.buffer.flags().contains(gst::BufferFlags::DROPPABLE) || buf.buffer.size() != 0 }); + + if buffers.is_empty() { + *timing_info = None; + } } // For ONVIF, replace all timestamps with timestamps based on UTC times. |