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:
t123yh 2023-10-21 12:45:11 -07:00 committed by Wim Taymans
parent 69134f8d3e
commit 8848923d82

View file

@ -71,6 +71,7 @@ struct impl {
struct spa_hook listener;
struct spa_list device_list;
struct pw_properties *props;
};
static struct node *find_node(struct object *obj, uint32_t id)
@ -302,7 +303,7 @@ static int start_monitor(struct impl *impl)
int res;
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) {
res = -errno;
goto out;
@ -362,6 +363,10 @@ int main(int argc, char *argv[])
return -1;
}
if ((impl.props = pw_properties_new(NULL, NULL)) == NULL) {
return -1;
}
pw_core_add_listener(impl.core,
&impl.core_listener,
&core_events, &impl);