mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
stream: don't crash when _set_control is given 0 values
This commit is contained in:
parent
bed961a4b2
commit
0873c6942a
1 changed files with 2 additions and 1 deletions
|
|
@ -2135,8 +2135,9 @@ int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_valu
|
|||
pw_log_debug("%p: set control %d %d %f", stream, id, n_values, values[0]);
|
||||
|
||||
if ((c = find_control(stream, id))) {
|
||||
uint32_t container = n_values > 0 ? c->container : SPA_TYPE_None;
|
||||
spa_pod_builder_prop(&b, id, 0);
|
||||
switch (c->container) {
|
||||
switch (container) {
|
||||
case SPA_TYPE_Float:
|
||||
spa_pod_builder_float(&b, values[0]);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue