mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-21 07:00:08 -05:00
stream: fix ticks calculation
This commit is contained in:
parent
fa15af376f
commit
8b02e5f737
1 changed files with 2 additions and 2 deletions
|
|
@ -644,8 +644,8 @@ static inline void copy_position(struct stream *impl, int64_t queued)
|
||||||
impl->time.rate.num = 1;
|
impl->time.rate.num = 1;
|
||||||
impl->time.rate.denom = SPA_NSEC_PER_SEC;
|
impl->time.rate.denom = SPA_NSEC_PER_SEC;
|
||||||
} else {
|
} else {
|
||||||
impl->time.ticks = p->clock.nsec * (p->clock.rate.denom /
|
impl->time.ticks = (p->clock.nsec * p->clock.rate.denom) /
|
||||||
(SPA_NSEC_PER_SEC * p->clock.rate.num));
|
(SPA_NSEC_PER_SEC * p->clock.rate.num);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
impl->time.ticks = p->clock.position - impl->base_pos;
|
impl->time.ticks = p->clock.position - impl->base_pos;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue