mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
examples: add props to bluez-session to prevent quirk parse error
In bluez5-dbus.c:impl_init, the info is passed to spa_bt_quirks_create, which expects info to be non-null. But in this example, info is null, so it will cause quirk table parse failure. Add an empty dict here to prevent this error.
This commit is contained in:
parent
69134f8d3e
commit
8848923d82
1 changed files with 6 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ struct impl {
|
||||||
struct spa_hook listener;
|
struct spa_hook listener;
|
||||||
|
|
||||||
struct spa_list device_list;
|
struct spa_list device_list;
|
||||||
|
struct pw_properties *props;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct node *find_node(struct object *obj, uint32_t id)
|
static struct node *find_node(struct object *obj, uint32_t id)
|
||||||
|
|
@ -302,7 +303,7 @@ static int start_monitor(struct impl *impl)
|
||||||
int res;
|
int res;
|
||||||
void *iface;
|
void *iface;
|
||||||
|
|
||||||
handle = pw_context_load_spa_handle(impl->context, SPA_NAME_API_BLUEZ5_ENUM_DBUS, NULL);
|
handle = pw_context_load_spa_handle(impl->context, SPA_NAME_API_BLUEZ5_ENUM_DBUS, &impl->props->dict);
|
||||||
if (handle == NULL) {
|
if (handle == NULL) {
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
@ -362,6 +363,10 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((impl.props = pw_properties_new(NULL, NULL)) == NULL) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
pw_core_add_listener(impl.core,
|
pw_core_add_listener(impl.core,
|
||||||
&impl.core_listener,
|
&impl.core_listener,
|
||||||
&core_events, &impl);
|
&core_events, &impl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue