diff options
author | Max Kellermann <max@duempel.org> | 2009-02-26 22:10:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-02-26 22:10:58 +0100 |
commit | dfea6b7cdd50ad14082b1848104d580b4380471b (patch) | |
tree | 1d8341518d69b5441da8990fa25f1059f300f212 | |
parent | ec926539a3a7a09b310e74a4fc84902e0971b29d (diff) | |
download | mpd-dfea6b7cdd50ad14082b1848104d580b4380471b.tar.gz mpd-dfea6b7cdd50ad14082b1848104d580b4380471b.tar.xz mpd-dfea6b7cdd50ad14082b1848104d580b4380471b.zip |
mvp: fixed default device detection
The check "open()!=0" is wrong, you have to write "open()>=0", because
-1 means error, and 0 is a valid file handle.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/output/mvp_plugin.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -20,6 +20,7 @@ ver 0.15 - (200?/??/??) - mvp: fall back to stereo - mvp: fall back to 16 bit audio samples - mvp: check for reopen errors + - mvp: fixed default device detection * commands: - "playlistinfo" supports a range now - added "sticker database", command "sticker", which allows clients diff --git a/src/output/mvp_plugin.c b/src/output/mvp_plugin.c index b9004029b..976a2c2b5 100644 --- a/src/output/mvp_plugin.c +++ b/src/output/mvp_plugin.c @@ -114,7 +114,7 @@ mvp_output_test_default_device(void) fd = open("/dev/adec_pcm", O_WRONLY); - if (fd) { + if (fd >= 0) { close(fd); return true; } |