forked from len0rd/rockbox
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
This commit is contained in:
parent
6be390f210
commit
d02b5c744e
4 changed files with 10 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue