output/fifo: move the buffer into the loop

This commit is contained in:
Max Kellermann 2015-08-06 10:14:53 +02:00
parent ccd83748f7
commit e0f55b9295
1 changed files with 1 additions and 2 deletions

View File

@ -226,12 +226,11 @@ FifoOutput::Close()
inline void
FifoOutput::Cancel()
{
char buf[FIFO_BUFFER_SIZE];
timer->Reset();
ssize_t bytes;
do {
char buf[FIFO_BUFFER_SIZE];
bytes = read(input, buf, FIFO_BUFFER_SIZE);
} while (bytes > 0 && errno != EINTR);