fmp4mux: Drop GAP buffers before doing ONVIF UTC time re-timestamping

GAP buffers won't have the reference timestamp meta.
This commit is contained in:
Sebastian Dröge 2022-10-02 12:23:37 +03:00 committed by Sebastian Dröge
parent 36ce8bd4f7
commit 9b85dcc03b

View file

@ -1252,10 +1252,6 @@ impl FMP4Mux {
fragment_end_pts,
) = self.drain_buffers(element, state, settings, timeout, at_eos)?;
// For ONVIF, replace all timestamps with timestamps based on UTC times.
let max_end_utc_time =
self.preprocess_drained_streams_onvif(element, state, &mut drained_streams)?;
// Remove all GAP buffers before processing them further
for (_, _, buffers) in &mut drained_streams {
buffers.retain(|buf| {
@ -1265,6 +1261,10 @@ impl FMP4Mux {
});
}
// For ONVIF, replace all timestamps with timestamps based on UTC times.
let max_end_utc_time =
self.preprocess_drained_streams_onvif(element, state, &mut drained_streams)?;
// Create header now if it was not created before and return the caps
let mut caps = None;
if state.stream_header.is_none() {