diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-02-01 15:56:03 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-02-01 15:57:00 +0300 |
commit | ecb26a0b16416d75846cb680e6320d8e8d66bb40 (patch) | |
tree | fc13ca562f85b5af52581907efed3b717a88c4d7 /mux | |
parent | 560bdc4cb7029ce943830090d047b4f1760e3e7e (diff) |
fmp4mux: Fix a couple of assertions by handling these cases cleaner
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1071>
Diffstat (limited to 'mux')
-rw-r--r-- | mux/fmp4/src/fmp4mux/imp.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs index 27ca82008..bdd750237 100644 --- a/mux/fmp4/src/fmp4mux/imp.rs +++ b/mux/fmp4/src/fmp4mux/imp.rs @@ -1264,9 +1264,10 @@ impl FMP4Mux { gst::trace!( CAT, obj: stream.sinkpad, - "Draining up to end PTS {} / duration {}", + "Draining from {} up to end PTS {} / duration {}", + chunk_start_pts, dequeue_end_pts, - dequeue_end_pts - chunk_start_pts + dequeue_end_pts.saturating_sub(chunk_start_pts), ); while let Some(gop) = stream.queued_gops.back() { @@ -1437,9 +1438,10 @@ impl FMP4Mux { gst::trace!( CAT, obj: stream.sinkpad, - "Draining up to end PTS {} / duration {}", + "Draining from {} up to end PTS {} / duration {}", + chunk_start_pts, dequeue_end_pts, - dequeue_end_pts - chunk_start_pts + dequeue_end_pts.saturating_sub(chunk_start_pts), ); while let Some(gop) = stream.queued_gops.back() { @@ -1767,9 +1769,6 @@ impl FMP4Mux { if all_eos || stream.sinkpad.is_eos() { // This is handled below generally if nothing was dequeued } else { - // Otherwise this can only really happen on timeout in live pipelines. - assert!(timeout); - if settings.chunk_duration.is_some() { gst::warning!( CAT, @@ -2316,7 +2315,6 @@ impl FMP4Mux { Err(err) => { if err == gst_base::AGGREGATOR_FLOW_NEED_DATA { assert!(!all_eos); - assert!(timeout); gst::element_imp_warning!( self, gst::StreamError::Format, |