forked from len0rd/rockbox
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
This commit is contained in:
parent
70dd64d23d
commit
929d5e9399
1 changed files with 1 additions and 1 deletions
|
|
@ -724,7 +724,7 @@ static void rebuffer_handle(int handle_id, size_t newpos)
|
|||
queue_send(&buffering_queue, Q_RESET_HANDLE, handle_id);
|
||||
|
||||
size_t next = (unsigned)((void *)h->next - (void *)buffer);
|
||||
if (next - h->data < h->filesize - newpos)
|
||||
if (RINGBUF_SUB(next, h->data) < h->filesize - newpos)
|
||||
{
|
||||
/* There isn't enough space to rebuffer all of the track from its new
|
||||
offset, so we ask the user to free some */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue