OBS-URL: https://build.opensuse.org/request/show/1088088 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=133
51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
From 1b823f1bc3363c496758a9230c9f5d4ce4491815 Mon Sep 17 00:00:00 2001
|
|
From: Wim Taymans <wtaymans@redhat.com>
|
|
Date: Thu, 18 May 2023 09:59:26 +0200
|
|
Subject: [PATCH] jack: update bufsize and samplerate when skipping notify
|
|
|
|
When we skip the notify because we are not active or we don't have a
|
|
callback, still update the buffer_size and sample_rate fields or else
|
|
we will keep on trying forever.
|
|
|
|
Fixes #3226
|
|
---
|
|
pipewire-jack/src/pipewire-jack.c | 14 +++++++++++---
|
|
1 file changed, 11 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c
|
|
index ee82425a9..ed21ccf76 100644
|
|
--- a/pipewire-jack/src/pipewire-jack.c
|
|
+++ b/pipewire-jack/src/pipewire-jack.c
|
|
@@ -1027,8 +1027,6 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1,
|
|
struct notify *notify;
|
|
bool emit = false;;
|
|
|
|
- if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
|
|
- return 0;
|
|
switch (type) {
|
|
case NOTIFY_TYPE_REGISTRATION:
|
|
emit = c->registration_callback != NULL && o != NULL;
|
|
@@ -1060,8 +1058,18 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1,
|
|
default:
|
|
break;
|
|
}
|
|
+ if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
|
|
+ emit = false;
|
|
if (!emit) {
|
|
- pw_log_debug("%p: skip notify %d", c, type);
|
|
+ switch (type) {
|
|
+ case NOTIFY_TYPE_BUFFER_FRAMES:
|
|
+ c->buffer_frames = arg1;
|
|
+ break;
|
|
+ case NOTIFY_TYPE_SAMPLE_RATE:
|
|
+ c->sample_rate = arg1;
|
|
+ break;
|
|
+ }
|
|
+ pw_log_debug("%p: skip notify %08x active:%d", c, type, c->active);
|
|
if (o != NULL && arg1 == 0 && o->removing) {
|
|
o->removing = false;
|
|
free_object(c, o);
|
|
--
|
|
2.40.1
|
|
|