From 14b242c7372e98fbc2cf07f219c6d2d68dd2c098 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Thu, 17 Jul 2025 16:32:15 +0200 Subject: [PATCH] node-driver: Make sure the discont clock flag does not remain set forever If the timer was canceled, the discont flag needs to be set. But in the next cycle, unless the timer was canceled again, that flag should not remain set. --- spa/plugins/support/node-driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spa/plugins/support/node-driver.c b/spa/plugins/support/node-driver.c index 1ca186a49..e7b2c702b 100644 --- a/spa/plugins/support/node-driver.c +++ b/spa/plugins/support/node-driver.c @@ -479,10 +479,8 @@ static void on_timeout(struct spa_source *source) this->clock->rate_diff = corr; this->clock->next_nsec = this->next_time + nsec_offset; - if (SPA_UNLIKELY(timer_was_canceled)) { - SPA_FLAG_UPDATE(this->clock->flags, - SPA_IO_CLOCK_FLAG_DISCONT, true); - } + SPA_FLAG_UPDATE(this->clock->flags, SPA_IO_CLOCK_FLAG_DISCONT, + timer_was_canceled); } spa_node_call_ready(&this->callbacks,