livesync: properly format jitter in debug logs

Easier to read that way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1430>
This commit is contained in:
Guillaume Desmottes 2024-01-16 13:46:34 +01:00
parent 9556abb162
commit c616423edb

View file

@ -1020,7 +1020,9 @@ impl LiveSync {
); );
let (res, jitter) = MutexGuard::unlocked(&mut state, || clock_id.wait()); let (res, jitter) = MutexGuard::unlocked(&mut state, || clock_id.wait());
gst::trace!(CAT, imp: self, "Clock returned {res:?} {jitter}",); gst::trace!(CAT, imp: self, "Clock returned {res:?} {}{}",
if jitter.is_negative() {"-"} else {""},
gst::ClockTime::from_nseconds(jitter.unsigned_abs()));
if res == Err(gst::ClockError::Unscheduled) { if res == Err(gst::ClockError::Unscheduled) {
return Err(gst::FlowError::Flushing); return Err(gst::FlowError::Flushing);