mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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
This commit is contained in:
parent
4206f6bbdb
commit
ce71b37b58
1 changed files with 11 additions and 3 deletions
|
|
@ -1027,8 +1027,6 @@ static int queue_notify(struct client *c, int type, struct object *o, int arg1,
|
||||||
struct notify *notify;
|
struct notify *notify;
|
||||||
bool emit = false;;
|
bool emit = false;;
|
||||||
|
|
||||||
if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
|
|
||||||
return 0;
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case NOTIFY_TYPE_REGISTRATION:
|
case NOTIFY_TYPE_REGISTRATION:
|
||||||
emit = c->registration_callback != NULL && o != NULL;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ((type & NOTIFY_ACTIVE_FLAG) && !c->active)
|
||||||
|
emit = false;
|
||||||
if (!emit) {
|
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) {
|
if (o != NULL && arg1 == 0 && o->removing) {
|
||||||
o->removing = false;
|
o->removing = false;
|
||||||
free_object(c, o);
|
free_object(c, o);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue