mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
gstreamer: Fix sticky event ordering for instant-rate-change
The event type for instant-rate-change events was poorly chosen, leading to them being re-sent too late and even after EOS. See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3387 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1154>
This commit is contained in:
parent
cbfc19ccfc
commit
3da927a856
1 changed files with 8 additions and 2 deletions
|
@ -112,8 +112,14 @@ impl PartialOrd for EventType {
|
|||
return None;
|
||||
}
|
||||
|
||||
let v1 = self.into_glib() as u32;
|
||||
let v2 = other.into_glib() as u32;
|
||||
// See gst_event_type_to_sticky_ordering() from 1.22
|
||||
let fixup_event_ordering = |v| match v {
|
||||
ffi::GST_EVENT_INSTANT_RATE_CHANGE => ffi::GST_EVENT_SEGMENT as u32 + 1,
|
||||
_ => v as u32,
|
||||
};
|
||||
|
||||
let v1 = fixup_event_ordering(self.into_glib());
|
||||
let v2 = fixup_event_ordering(other.into_glib());
|
||||
|
||||
let stream_start = ffi::GST_EVENT_STREAM_START as u32;
|
||||
let segment = ffi::GST_EVENT_SEGMENT as u32;
|
||||
|
|
Loading…
Reference in a new issue