forked from len0rd/rockbox
Patch by Mark Arigo to close bug report #5305 - fixes crashes when attempting to seek beyond the currently buffered data.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10181 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9ad33fe4b0
commit
b1a272eee2
1 changed files with 4 additions and 2 deletions
|
|
@ -1074,10 +1074,12 @@ static void rebuffer_and_seek(size_t newpos)
|
|||
last_peek_offset = 0;
|
||||
initialize_buffer_fill(true);
|
||||
|
||||
if (newpos > AUDIO_REBUFFER_GUESS_SIZE)
|
||||
if (newpos > AUDIO_REBUFFER_GUESS_SIZE) {
|
||||
buf_ridx += AUDIO_REBUFFER_GUESS_SIZE;
|
||||
cur_ti->start_pos = newpos - AUDIO_REBUFFER_GUESS_SIZE;
|
||||
else
|
||||
} else {
|
||||
cur_ti->start_pos = 0;
|
||||
}
|
||||
|
||||
cur_ti->filerem = cur_ti->filesize - cur_ti->start_pos;
|
||||
cur_ti->available = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue