livesync: Log a category error when we are missing the segment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-10-25 00:20:12 +02:00
parent 6567041a3d
commit d663f708ef

View file

@ -894,7 +894,10 @@ impl LiveSync {
}
// At this stage we should really really have a segment
let segment = state.in_segment.as_ref().ok_or(gst::FlowError::Error)?;
let segment = state.in_segment.as_ref().ok_or_else(|| {
gst::error!(CAT, imp: self, "Missing segment");
gst::FlowError::Error
})?;
if state.single_segment {
let dts = segment