Small fixes

This commit is contained in:
Linus Dierheimer
2023-01-27 11:21:01 +01:00
parent b0c19256f0
commit 672e309d89
2 changed files with 7 additions and 10 deletions
+1 -1
View File
@@ -202,4 +202,4 @@ void ffDBusGetPropertyString(FFDBusData* dbus, const char* busName, const char*
dbus->lib->ffdbus_message_unref(reply);
}
#endif //FF_DBUS_H
#endif //FF_HAVE_DBUS
+6 -9
View File
@@ -105,20 +105,17 @@ static const char* detectSound(const FFinstance* instance, FFlist* devices)
ffpa_operation_unref(operation);
operation = ffpa_context_get_server_info(context, paServerInfoCallback, devices);
if(!operation)
if(operation)
{
ffpa_context_unref(context);
ffpa_mainloop_free(mainloop);
return "Failed to get pulseaudio server info";
while(ffpa_operation_get_state(operation) == PA_OPERATION_RUNNING)
ffpa_mainloop_iterate(mainloop, 1, NULL);
ffpa_operation_unref(operation);
}
while(ffpa_operation_get_state(operation) == PA_OPERATION_RUNNING)
ffpa_mainloop_iterate(mainloop, 1, NULL);
ffpa_operation_unref(operation);
ffpa_context_unref(context);
ffpa_mainloop_free(mainloop);
dlclose(pulse);
return NULL;
}