summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2008-07-11 12:44:27 +0000
committerMagnus Holmgren <magnushol@gmail.com>2008-07-11 12:44:27 +0000
commit7c84ede3781c27db73403bd6302f320c76a58c8c (patch)
tree2da71a63b06047a20c5db129070cc804d99fd63a /apps
parentaae69dff459324496ddf6df445f0b1e5a0d5cdf3 (diff)
downloadrockbox-7c84ede3781c27db73403bd6302f320c76a58c8c.tar.gz
rockbox-7c84ede3781c27db73403bd6302f320c76a58c8c.tar.bz2
rockbox-7c84ede3781c27db73403bd6302f320c76a58c8c.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/buffering.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/buffering.c b/apps/buffering.c
index c3687e83a3..588d98f30e 100644
--- a/apps/buffering.c
+++ b/apps/buffering.c
@@ -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)) {