aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-12 19:49:10 +0100
committerMax Kellermann <max@duempel.org>2009-03-12 19:49:10 +0100
commite3b9b57ecdf8c1396d120f1ccee0814a3e119511 (patch)
tree3c2dfbaf635964f8189e0953ae772fa85c3c857a /src
parentd8218cae6b6742c56d0f570d5c8a27f1d8a17290 (diff)
downloadmpd-e3b9b57ecdf8c1396d120f1ccee0814a3e119511.tar.gz
mpd-e3b9b57ecdf8c1396d120f1ccee0814a3e119511.tar.xz
mpd-e3b9b57ecdf8c1396d120f1ccee0814a3e119511.zip
output_all: fix off-by-one error in audio_output_all_check()
When there are chunks which are not yet finished, audio_output_all_check() returned the size of its music pipe minus one. I can't remember exactly why I subtracted 1 from the return value, it must have had something to do with a former meaning of this function. Now it induces assertion failures.
Diffstat (limited to 'src')
-rw-r--r--src/output_all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output_all.c b/src/output_all.c
index a0f90df52..a95ff2d16 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -364,7 +364,7 @@ audio_output_all_check(void)
if (!chunk_is_consumed(chunk))
/* at least one output is not finished playing
this chunk */
- return music_pipe_size(g_mp) - 1;
+ return music_pipe_size(g_mp);
is_tail = chunk->next == NULL;
if (is_tail)