aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_init.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-28 20:43:23 +0100
committerMax Kellermann <max@duempel.org>2009-02-28 20:43:23 +0100
commitec4fd9fd88a10bfc88154e8e6791d5d69858a2e5 (patch)
treec98fe447adcafe85ba9ee94d93d98377f9ffdaeb /src/output_init.c
parenta5c09c91c414ba08d915331797e717334ac06456 (diff)
downloadmpd-ec4fd9fd88a10bfc88154e8e6791d5d69858a2e5.tar.gz
mpd-ec4fd9fd88a10bfc88154e8e6791d5d69858a2e5.tar.xz
mpd-ec4fd9fd88a10bfc88154e8e6791d5d69858a2e5.zip
output: use GTimer instead of time_t for reopen after failure
time() is not a monotonic timer, and MPD might get confused by clock skews. clock_gettime() provides a monotonic clock, but is not portable to non-POSIX systems (i.e. Windows). This patch uses GLib's GTimer API, which aims to be portable.
Diffstat (limited to 'src/output_init.c')
-rw-r--r--src/output_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output_init.c b/src/output_init.c
index 962a805af..a007dbd1b 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -93,7 +93,7 @@ audio_output_init(struct audio_output *ao, const struct config_param *param)
ao->plugin = plugin;
ao->enabled = config_get_block_bool(param, "enabled", true);
ao->open = false;
- ao->reopen_after = 0;
+ ao->fail_timer = NULL;
pcm_convert_init(&ao->convert_state);