diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2007-11-05 01:56:12 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2007-11-05 01:56:12 +0000 |
| commit | d02b5c744e39ea87980f75ad172aaaf0fcb29252 (patch) | |
| tree | 0e4ce0b6bbba1ab3f7158a742a6a97d5766c7465 /apps/buffering.c | |
| parent | 6be390f21091ac3438d4ddb7935d985f2e4286ab (diff) | |
| download | rockbox-d02b5c744e39ea87980f75ad172aaaf0fcb29252.zip rockbox-d02b5c744e39ea87980f75ad172aaaf0fcb29252.tar.gz rockbox-d02b5c744e39ea87980f75ad172aaaf0fcb29252.tar.bz2 rockbox-d02b5c744e39ea87980f75ad172aaaf0fcb29252.tar.xz | |
Don't keep useless id3v2 or other leading tag data on the buffer, it could be large
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15465 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/buffering.c')
| -rw-r--r-- | apps/buffering.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index 9c8d107..072517f 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -563,12 +563,12 @@ static bool buffer_handle(int handle_id) /* This would read into the next handle, this is broken */ if (h->next && RINGBUF_ADD_CROSS(h->widx, copy_n, (unsigned)((void *)h->next - (void *)buffer)) > 0) { - logf("Handle allocation short"); /* Try to recover by truncating this file */ - int overlap = RINGBUF_ADD_CROSS(h->widx, copy_n, + copy_n = RINGBUF_ADD_CROSS(h->widx, copy_n, (unsigned)((void *)h->next - (void *)buffer)); - h->filerem -= overlap; - h->filesize -= overlap; + h->filerem -= copy_n; + h->filesize -= copy_n; + logf("buf alloc short %ld",copy_n); if (h->filerem) continue; else |