Commit e587518d authored by Max Kellermann's avatar Max Kellermann

output/raop: remove from the session when opening fails

parent 210b6c38
......@@ -826,11 +826,15 @@ raop_output_open(void *data, struct audio_format *audio_format, GError **error_r
g_mutex_unlock(raop_session->list_mutex);
audio_format->format = SAMPLE_FORMAT_S16;
if (!raopcl_connect(rd, error_r))
if (!raopcl_connect(rd, error_r)) {
raop_output_remove(rd);
return false;
}
if (!raop_set_volume(rd, rd->volume, error_r))
if (!raop_set_volume(rd, rd->volume, error_r)) {
raop_output_remove(rd);
return false;
}
g_mutex_lock(raop_session->list_mutex);
if (!rd->is_master) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment