diff options
author | Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> | 2023-10-25 01:18:03 +0300 |
---|---|---|
committer | Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> | 2023-10-25 12:52:40 +0300 |
commit | 1740a8e36314a0c8b2458c1eec19127d944669af (patch) | |
tree | 3c33bb6ee2a975707d654392f395a51906166d95 /utils | |
parent | 44f21956748606574f34e345fa7c569384e738d7 (diff) |
livesync: Move a notify closer to the interesting state change
Move the `notify_all` to where we pop the buffer. We're moving within a
single state lock so no change in behavior.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/livesync/src/livesync/imp.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs index 25fadaf77..169d6102a 100644 --- a/utils/livesync/src/livesync/imp.rs +++ b/utils/livesync/src/livesync/imp.rs @@ -1074,6 +1074,7 @@ impl LiveSync { None } else { state.buffer_queued = false; + self.cond.notify_all(); Some((buffer, lateness)) } } @@ -1138,7 +1139,6 @@ impl LiveSync { segment = state.pending_segment.take(); duplicate = lateness != BufferLateness::OnTime; - self.cond.notify_all(); } None => { // Work around borrow checker |