From 8b02e5f737b42631af5c134a71608b8cd0658773 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 24 Jan 2025 16:39:16 +0100 Subject: [PATCH] stream: fix ticks calculation --- src/pipewire/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index ce6a95f90..e65e10e4d 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -644,8 +644,8 @@ static inline void copy_position(struct stream *impl, int64_t queued) impl->time.rate.num = 1; impl->time.rate.denom = SPA_NSEC_PER_SEC; } else { - impl->time.ticks = p->clock.nsec * (p->clock.rate.denom / - (SPA_NSEC_PER_SEC * p->clock.rate.num)); + impl->time.ticks = (p->clock.nsec * p->clock.rate.denom) / + (SPA_NSEC_PER_SEC * p->clock.rate.num); } } else { impl->time.ticks = p->clock.position - impl->base_pos;