From de9b28f783f6bfb51f8b77774ba7c42c3dc7fccd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 22 May 2023 09:48:51 +0200 Subject: [PATCH] context: don't use fallback driver if priority_driver <= 0 The drivers with priority_driver <= 0 should not be used as a fallback driver for audio ever because it does not do the timing correctly. One example is the screencast driver. Fixes #3219 --- src/pipewire/context.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pipewire/context.c b/src/pipewire/context.c index 95f70eff4..38096cb97 100644 --- a/src/pipewire/context.c +++ b/src/pipewire/context.c @@ -1260,9 +1260,10 @@ again: collect_nodes(context, n, &collect); move_to_driver(context, &collect, n); } - /* from now on we are only interested in active driving nodes. - * We're going to see if there are active followers. */ - if (!n->driving || !n->active) + /* from now on we are only interested in active driving nodes + * with a driver_priority. We're going to see if there are + * active followers. */ + if (!n->driving || !n->active || n->priority_driver <= 0) continue; /* first active driving node is fallback */