diff options
author | Max Kellermann <max@duempel.org> | 2011-08-30 22:00:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-30 22:00:19 +0200 |
commit | e587518d85ebc618d8c0a6eb258918f4a19a957f (patch) | |
tree | e15c342ca29ca6fae21e3d61a0cd20dbbac63d67 /src | |
parent | 210b6c38bd945fd2d1a18c9e8f965b6dc6bc5ecb (diff) | |
download | mpd-e587518d85ebc618d8c0a6eb258918f4a19a957f.tar.gz mpd-e587518d85ebc618d8c0a6eb258918f4a19a957f.tar.xz mpd-e587518d85ebc618d8c0a6eb258918f4a19a957f.zip |
output/raop: remove from the session when opening fails
Diffstat (limited to '')
-rw-r--r-- | src/output/raop_output_plugin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/output/raop_output_plugin.c b/src/output/raop_output_plugin.c index 5e4a9b4f7..15438aa00 100644 --- a/src/output/raop_output_plugin.c +++ b/src/output/raop_output_plugin.c @@ -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) { |