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/1083>
@@ -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;
+ }
+
_ => {}
}
