mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
loop: fix update_timer handling of solo repeat argument
I believe the intent here is that if a `interval` is provided but `value` is unset, then `value` should default to `period` so the timer first fires after one `interval`. Since `interval` is always a relative duration, `value` should be interpreted as a relative duration, not an absolute one.
This commit is contained in:
parent
0b39c4ec68
commit
2770e96e08
1 changed files with 2 additions and 1 deletions
|
|
@ -884,8 +884,9 @@ loop_update_timer(void *object, struct spa_source *source,
|
|||
if (SPA_LIKELY(value)) {
|
||||
its.it_value = *value;
|
||||
} else if (interval) {
|
||||
// timer initially fires after one interval
|
||||
its.it_value = *interval;
|
||||
absolute = true;
|
||||
absolute = false;
|
||||
}
|
||||
if (SPA_UNLIKELY(interval))
|
||||
its.it_interval = *interval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue