livesync: Improve formatting

Move some code around to make it a bit more readable. No change in
behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-02-09 10:03:46 +01:00 committed by Sebastian Dröge
parent 9d67753fd6
commit fbf50b395d

View file

@ -51,15 +51,15 @@ enum Item {
Query(std::ptr::NonNull<gst::QueryRef>, mpsc::SyncSender<bool>),
}
// SAFETY: Need to be able to pass *mut gst::QueryRef
unsafe impl Send for Item {}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
struct Timestamps {
start: gst::ClockTime,
end: gst::ClockTime,
}
// SAFETY: Need to be able to pass *mut gst::QueryRef
unsafe impl Send for Item {}
#[derive(Debug)]
pub struct LiveSync {
state: Mutex<State>,
@ -614,11 +614,6 @@ impl LiveSync {
state.in_segment = Some(segment.clone());
}
gst::EventView::Gap(_) => {
gst::debug!(CAT, imp: self, "Got gap event");
return true;
}
gst::EventView::Eos(_) => {
let mut state = self.state.lock();
@ -648,6 +643,11 @@ impl LiveSync {
state.update_fallback_duration();
}
gst::EventView::Gap(_) => {
gst::debug!(CAT, imp: self, "Got gap event");
return true;
}
_ => {}
}