pipewire-object: take ownership of param argument

The wp_pipewire_object_set_param API must take ownership of the param argument
as described by the documentation.
This commit is contained in:
Julian Bouzas
2021-06-03 08:58:15 -04:00
parent 47ed9bb527
commit 3fbcf05c9b
6 changed files with 27 additions and 26 deletions

View File

@@ -1089,7 +1089,7 @@ pipewire_object_set_param (lua_State *L)
WpPipewireObject *pwobj = wplua_checkobject (L, 1, WP_TYPE_PIPEWIRE_OBJECT);
const gchar *id = luaL_checkstring (L, 2);
WpSpaPod *pod = wplua_checkboxed (L, 3, WP_TYPE_SPA_POD);
wp_pipewire_object_set_param (pwobj, id, 0, pod);
wp_pipewire_object_set_param (pwobj, id, 0, wp_spa_pod_ref (pod));
return 0;
}