diff options
author | Max Kellermann <max@duempel.org> | 2015-08-06 10:15:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-06 10:15:19 +0200 |
commit | 024d978ae5f2a5f1f285afdf6dfcafc28575863e (patch) | |
tree | 7db551b0413b62b5cc393110d1d14721b188b06d /src | |
parent | e0f55b9295a863b171d5cdc4315170c122b559a6 (diff) | |
download | mpd-024d978ae5f2a5f1f285afdf6dfcafc28575863e.tar.gz mpd-024d978ae5f2a5f1f285afdf6dfcafc28575863e.tar.xz mpd-024d978ae5f2a5f1f285afdf6dfcafc28575863e.zip |
output/fifo: smaller Cancel() buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/output/plugins/FifoOutputPlugin.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/output/plugins/FifoOutputPlugin.cxx b/src/output/plugins/FifoOutputPlugin.cxx index c2310b98f..d4019df53 100644 --- a/src/output/plugins/FifoOutputPlugin.cxx +++ b/src/output/plugins/FifoOutputPlugin.cxx @@ -35,8 +35,6 @@ #include <errno.h> #include <unistd.h> -#define FIFO_BUFFER_SIZE 65536 /* pipe capacity on Linux >= 2.6.11 */ - class FifoOutput { friend struct AudioOutputWrapper<FifoOutput>; @@ -230,8 +228,8 @@ FifoOutput::Cancel() ssize_t bytes; do { - char buf[FIFO_BUFFER_SIZE]; - bytes = read(input, buf, FIFO_BUFFER_SIZE); + char buffer[16384]; + bytes = read(input, buffer, sizeof(buffer)); } while (bytes > 0 && errno != EINTR); if (bytes < 0 && errno != EAGAIN) { |