small fixes

This commit is contained in:
Anthony Ilersich 2022-11-15 11:34:24 -05:00
parent 5ad2445c1b
commit 9abbda10ac

View file

@ -1114,10 +1114,12 @@ static const struct spa_node_methods impl_node = {
.port_reuse_buffer = impl_port_reuse_buffer,
};
static void session_event_info (void *data, const struct pw_session_info *info) {
static void session_event_info (void *data, const struct pw_session_info *info)
{
struct pw_stream *stream = data;
pw_log_error("%p: stream has received session info", stream);
const char *services = spa_dict_lookup(info->props, PW_KEY_SESSION_SERVICES);
if (services == NULL || !strcmp(services, PW_SESSION_SERVICE_NONE)) {
if (services == NULL || spa_streq(services, PW_SESSION_SERVICE_NONE)) {
return;
}
// some services are available, so the stream can now be considered
@ -1141,7 +1143,7 @@ static void registry_event_global(void *data, uint32_t id,
if (stream->session != NULL)
return;
if (strcmp(type, PW_TYPE_INTERFACE_Session) == 0) {
if (spa_streq(type, PW_TYPE_INTERFACE_Session)) {
stream->session = pw_registry_bind(stream->registry,
id, type, PW_VERSION_SESSION, 0);
pw_session_add_listener(stream->session,