aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-09 19:08:35 +0100
committerMax Kellermann <max@duempel.org>2009-03-09 19:08:35 +0100
commit71e88271d96953e5ff10d4dce02715d7f06e0bb3 (patch)
treeec8cf8490bc42c03b9822e9ae05bd106ff86d0b5
parent4d3d091c22b03bc70a53a96161778b0ea191a0ae (diff)
downloadmpd-71e88271d96953e5ff10d4dce02715d7f06e0bb3.tar.gz
mpd-71e88271d96953e5ff10d4dce02715d7f06e0bb3.tar.xz
mpd-71e88271d96953e5ff10d4dce02715d7f06e0bb3.zip
output_thread: wait 10 seconds before reopening after play failure
This is similar to the MPD 0.14 patch "wait 10 seconds before reopening a failed device", which only covered open() failures. This patch adds the same feature for play().
-rw-r--r--NEWS1
-rw-r--r--src/output_thread.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 116d87a21..1acfd7975 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ ver 0.15 - (200?/??/??)
- added configuration option to disable decoder plugins
* audio outputs:
- added option to disable audio outputs by default
+ - wait 10 seconds before reopening after play failure
- shout: enlarged buffer size to 32 kB
- null: allow disabling synchronization
- mvp: fall back to stereo
diff --git a/src/output_thread.c b/src/output_thread.c
index c5e4b4fa2..a55260785 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -83,6 +83,10 @@ static void ao_play(struct audio_output *ao)
ao_plugin_cancel(ao->plugin, ao->data);
ao_close(ao);
+
+ /* don't automatically reopen this device for
+ 10 seconds */
+ ao->fail_timer = g_timer_new();
break;
}