From 65e7402d017cd2f36148b53fef0197f142475a74 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 29 Jul 2021 16:50:39 +0200 Subject: [PATCH] context: log rate changes We don't need to check, rt.position of a node is never NULL. Check if the rate changed and log an info message, just like we do for the quantum. --- src/pipewire/context.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index f407212a8..4de1d68f7 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1123,8 +1123,14 @@ again: quantum = SPA_CLAMP(quantum, min_quantum, max_quantum); - n->rt.position->clock.rate = SPA_FRACTION(1, def_rate); - if (n->rt.position && quantum != n->rt.position->clock.duration) { + if (def_rate != n->rt.position->clock.rate.denom) { + pw_log_info("(%s-%u) new rate:%u->%u", + n->name, n->info.id, + n->rt.position->clock.rate.denom, + def_rate); + n->rt.position->clock.rate = SPA_FRACTION(1, def_rate); + } + if (quantum != n->rt.position->clock.duration) { pw_log_info("(%s-%u) new quantum:%"PRIu64"->%u", n->name, n->info.id, n->rt.position->clock.duration,