diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-07-18 23:26:35 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-07-18 23:26:35 +0000 |
commit | 929d5e9399eabead217e69dc7ca009ad4f0f4e6d (patch) | |
tree | f622eed58338d6f30426ab55ea46a7d3e47f9951 | |
parent | 70dd64d23d9bca166f7d66f102084acba54f9143 (diff) | |
download | rockbox-929d5e9399eabead217e69dc7ca009ad4f0f4e6d.tar.gz rockbox-929d5e9399eabead217e69dc7ca009ad4f0f4e6d.zip |
Fix FS#9137 and FS#8194 (the end of a track is cut off after rebuffering): the cause was a confusion between regular subtraction and subtraction in a ring-buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18090 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/buffering.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index 588d98f30e..30601481e4 100644 --- a/apps/buffering.c +++ b/apps/buffering.c | |||
@@ -724,7 +724,7 @@ static void rebuffer_handle(int handle_id, size_t newpos) | |||
724 | queue_send(&buffering_queue, Q_RESET_HANDLE, handle_id); | 724 | queue_send(&buffering_queue, Q_RESET_HANDLE, handle_id); |
725 | 725 | ||
726 | size_t next = (unsigned)((void *)h->next - (void *)buffer); | 726 | size_t next = (unsigned)((void *)h->next - (void *)buffer); |
727 | if (next - h->data < h->filesize - newpos) | 727 | if (RINGBUF_SUB(next, h->data) < h->filesize - newpos) |
728 | { | 728 | { |
729 | /* There isn't enough space to rebuffer all of the track from its new | 729 | /* There isn't enough space to rebuffer all of the track from its new |
730 | offset, so we ask the user to free some */ | 730 | offset, so we ask the user to free some */ |