1
0
Fork 0
forked from len0rd/rockbox

This might fix the buffering problem. Didn't happen to me the way I usually reproduce it just now

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9668 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2006-04-14 22:15:38 +00:00
parent 993545b4fb
commit 363dbc4b58

View file

@ -24,6 +24,8 @@
* to do on a seek request, if it is a previous track seek, skip previous, * to do on a seek request, if it is a previous track seek, skip previous,
* and in the request_next_track callback set the offset up the same way that * and in the request_next_track callback set the offset up the same way that
* starting from an offset works. */ * starting from an offset works. */
/* This is also necesary to prevent the problem with buffer overwriting on
* automatic track changes */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -1761,7 +1763,8 @@ static void initialize_buffer_fill(bool clear_tracks, bool short_fill)
else if (!filling_short) else if (!filling_short)
{ {
fill_bytesleft = filebuflen - filebufused; fill_bytesleft = filebuflen - filebufused;
cur_ti->start_pos = ci.curpos; if (buf_ridx > cur_ti->buf_idx)
cur_ti->start_pos = buf_ridx - cur_ti->buf_idx;
} }
/* Don't initialize if we're already initialized */ /* Don't initialize if we're already initialized */