From 2fc8d6a27dfe651969dcc1ac1ade2e0f3ddefe84 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 25 Sep 2024 10:52:00 +0200 Subject: [PATCH] togglerecord: provide details when RT assertion fails We hit this assertion once during our tests but it's unclear why. This change will hopefully help us understanding what's going on next time. Part-of: --- utils/togglerecord/src/togglerecord/imp.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/togglerecord/src/togglerecord/imp.rs b/utils/togglerecord/src/togglerecord/imp.rs index fd4fa7c1..6e075bd7 100644 --- a/utils/togglerecord/src/togglerecord/imp.rs +++ b/utils/togglerecord/src/togglerecord/imp.rs @@ -1010,9 +1010,15 @@ impl ToggleRecord { // We're properly started, must have a start position and // be actually after that start position - assert!(current_running_time + if !current_running_time .opt_ge(rec_state.last_recording_start) - .unwrap_or(false)); + .unwrap_or(false) + { + panic!( + "current RT ({current_running_time:?}) < last_recording_start ({:?})", + rec_state.last_recording_start + ); + } gst::log!(CAT, obj = pad, "Passing buffer (recording)"); Ok(HandleResult::Pass(data)) }