diff --git a/spa/plugins/audiotestsrc/audiotestsrc.c b/spa/plugins/audiotestsrc/audiotestsrc.c index 4d20c6457..2a7174b4c 100644 --- a/spa/plugins/audiotestsrc/audiotestsrc.c +++ b/spa/plugins/audiotestsrc/audiotestsrc.c @@ -277,6 +277,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, if (id == SPA_PARAM_Props) { struct props *p = &this->props; + struct port *port = &this->port; if (param == NULL) { reset_props(p); @@ -290,9 +291,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, SPA_PROP_volume, SPA_POD_OPT_Float(&p->volume)); if (p->live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; else - this->info.flags &= ~SPA_PORT_FLAG_LIVE; + port->info.flags &= ~SPA_PORT_FLAG_LIVE; } else return -ENOENT; @@ -1081,7 +1082,7 @@ impl_init(const struct spa_handle_factory *factory, port->info = SPA_PORT_INFO_INIT(); port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/test/fakesink.c b/spa/plugins/test/fakesink.c index 05ff59d9c..fee62334b 100644 --- a/spa/plugins/test/fakesink.c +++ b/spa/plugins/test/fakesink.c @@ -168,8 +168,12 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, spa_return_val_if_fail(this != NULL, -EINVAL); + switch (id) { case SPA_PARAM_Props: + { + struct port *port = &this->port; + if (param == NULL) { reset_props(this, &this->props); return 0; @@ -179,11 +183,11 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, SPA_PROP_live, SPA_POD_OPT_Bool(&this->props.live)); if (this->props.live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; else - this->info.flags &= ~SPA_PORT_FLAG_LIVE; + port->info.flags &= ~SPA_PORT_FLAG_LIVE; break; - + } default: return -ENOENT; } diff --git a/spa/plugins/test/fakesrc.c b/spa/plugins/test/fakesrc.c index d316dff36..fa7bee7e0 100644 --- a/spa/plugins/test/fakesrc.c +++ b/spa/plugins/test/fakesrc.c @@ -181,6 +181,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, case SPA_PARAM_Props: { struct props *p = &this->props; + struct port *port = &this->port; if (param == NULL) { reset_props(this, p); @@ -192,9 +193,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, SPA_PROP_patternType, SPA_POD_OPT_Id(&p->pattern)); if (p->live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; else - this->info.flags &= ~SPA_PORT_FLAG_LIVE; + port->info.flags &= ~SPA_PORT_FLAG_LIVE; break; } default: diff --git a/spa/plugins/videotestsrc/videotestsrc.c b/spa/plugins/videotestsrc/videotestsrc.c index 529a489b5..2c7e9e1ae 100644 --- a/spa/plugins/videotestsrc/videotestsrc.c +++ b/spa/plugins/videotestsrc/videotestsrc.c @@ -229,6 +229,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, case SPA_PARAM_Props: { struct props *p = &this->props; + struct port *port = &this->port; if (param == NULL) { reset_props(p); @@ -240,9 +241,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, SPA_PROP_patternType, SPA_POD_OPT_Int(&p->pattern)); if (p->live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; else - this->info.flags &= ~SPA_PORT_FLAG_LIVE; + port->info.flags &= ~SPA_PORT_FLAG_LIVE; break; } default: @@ -928,7 +929,7 @@ impl_init(const struct spa_handle_factory *factory, port->info = SPA_PORT_INFO_INIT(); port->info.flags = SPA_PORT_FLAG_NO_REF; if (this->props.live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ); diff --git a/spa/plugins/vulkan/vulkan-compute-source.c b/spa/plugins/vulkan/vulkan-compute-source.c index c3cfd72c5..2606a32c4 100644 --- a/spa/plugins/vulkan/vulkan-compute-source.c +++ b/spa/plugins/vulkan/vulkan-compute-source.c @@ -225,6 +225,7 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, case SPA_PARAM_Props: { struct props *p = &this->props; + struct port *port = &this->port; if (param == NULL) { reset_props(p); @@ -235,9 +236,9 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, SPA_PROP_live, SPA_POD_OPT_Bool(&p->live)); if (p->live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; else - this->info.flags &= ~SPA_PORT_FLAG_LIVE; + port->info.flags &= ~SPA_PORT_FLAG_LIVE; break; } default: @@ -945,7 +946,7 @@ impl_init(const struct spa_handle_factory *factory, port->info = SPA_PORT_INFO_INIT(); port->info.flags = SPA_PORT_FLAG_NO_REF | SPA_PORT_FLAG_CAN_ALLOC_BUFFERS; if (this->props.live) - this->info.flags |= SPA_PORT_FLAG_LIVE; + port->info.flags |= SPA_PORT_FLAG_LIVE; port->params[0] = SPA_PARAM_INFO(SPA_PARAM_EnumFormat, SPA_PARAM_INFO_READ); port->params[1] = SPA_PARAM_INFO(SPA_PARAM_Meta, SPA_PARAM_INFO_READ); port->params[2] = SPA_PARAM_INFO(SPA_PARAM_IO, SPA_PARAM_INFO_READ);