mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Hopefully fix FS #9153, as well as another bug (in fill_buffer) that could cause problems when rebuffering.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18009 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aae69dff45
commit
7c84ede378
1 changed files with 4 additions and 5 deletions
|
@ -689,7 +689,7 @@ static void reset_handle(int handle_id)
|
|||
if (!h)
|
||||
return;
|
||||
|
||||
h->widx = h->data;
|
||||
h->ridx = h->widx = h->data;
|
||||
if (h == cur_handle)
|
||||
buf_widx = h->widx;
|
||||
h->available = 0;
|
||||
|
@ -735,8 +735,6 @@ static void rebuffer_handle(int handle_id, size_t newpos)
|
|||
/* Now we ask for a rebuffer */
|
||||
LOGFQUEUE("buffering >| Q_BUFFER_HANDLE");
|
||||
queue_send(&buffering_queue, Q_BUFFER_HANDLE, handle_id);
|
||||
|
||||
h->ridx = h->data;
|
||||
}
|
||||
|
||||
static bool close_handle(int handle_id)
|
||||
|
@ -814,8 +812,9 @@ static void shrink_handle(struct memory_handle *h)
|
|||
static bool fill_buffer(void)
|
||||
{
|
||||
logf("fill_buffer()");
|
||||
struct memory_handle *m = first_handle;
|
||||
shrink_handle(m);
|
||||
struct memory_handle *m;
|
||||
shrink_handle(first_handle);
|
||||
m = first_handle;
|
||||
while (queue_empty(&buffering_queue) && m) {
|
||||
if (m->filerem > 0) {
|
||||
if (!buffer_handle(m->id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue