diff options
author | Brandon Low <lostlogic@rockbox.org> | 2007-11-03 21:57:27 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2007-11-03 21:57:27 +0000 |
commit | 7b74dd7574b61493a8b9bf5d52bf78ea81d76262 (patch) | |
tree | cfd62eb1a9f581403d67a87c8fbdc091419062e7 | |
parent | 0c97493a88b820bae3df5b24b4eb198816affb32 (diff) | |
download | rockbox-7b74dd7574b61493a8b9bf5d52bf78ea81d76262.tar.gz rockbox-7b74dd7574b61493a8b9bf5d52bf78ea81d76262.zip |
Attempt to fix FS#8077... again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15441 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/buffering.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index b92b5d1620..77eaba8959 100644 --- a/apps/buffering.c +++ b/apps/buffering.c | |||
@@ -550,11 +550,11 @@ static bool buffer_handle(int handle_id) | |||
550 | logf("buffer_handle(%d)", handle_id); | 550 | logf("buffer_handle(%d)", handle_id); |
551 | struct memory_handle *h = find_handle(handle_id); | 551 | struct memory_handle *h = find_handle(handle_id); |
552 | if (!h) | 552 | if (!h) |
553 | return -1; | 553 | return true; |
554 | 554 | ||
555 | if (h->filerem == 0) { | 555 | if (h->filerem == 0) { |
556 | /* nothing left to buffer */ | 556 | /* nothing left to buffer */ |
557 | return false; | 557 | return true; |
558 | } | 558 | } |
559 | 559 | ||
560 | if (h->fd < 0) /* file closed, reopen */ | 560 | if (h->fd < 0) /* file closed, reopen */ |
@@ -562,10 +562,10 @@ static bool buffer_handle(int handle_id) | |||
562 | if (*h->path) | 562 | if (*h->path) |
563 | h->fd = open(h->path, O_RDONLY); | 563 | h->fd = open(h->path, O_RDONLY); |
564 | else | 564 | else |
565 | return false; | 565 | return true; |
566 | 566 | ||
567 | if (h->fd < 0) | 567 | if (h->fd < 0) |
568 | return false; | 568 | return true; |
569 | 569 | ||
570 | if (h->offset) | 570 | if (h->offset) |
571 | lseek(h->fd, h->offset, SEEK_SET); | 571 | lseek(h->fd, h->offset, SEEK_SET); |
@@ -1189,6 +1189,9 @@ void buffering_thread(void) | |||
1189 | case Q_BUFFER_HANDLE: | 1189 | case Q_BUFFER_HANDLE: |
1190 | LOGFQUEUE("buffering < Q_BUFFER_HANDLE"); | 1190 | LOGFQUEUE("buffering < Q_BUFFER_HANDLE"); |
1191 | queue_reply(&buffering_queue, 1); | 1191 | queue_reply(&buffering_queue, 1); |
1192 | /* Call buffer callbacks here because this is one of two ways | ||
1193 | * to begin a full buffer fill */ | ||
1194 | call_buffer_low_callbacks(); | ||
1192 | filling |= buffer_handle((int)ev.data); | 1195 | filling |= buffer_handle((int)ev.data); |
1193 | break; | 1196 | break; |
1194 | 1197 | ||