summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-04-14 22:15:38 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-04-14 22:15:38 +0000
commit363dbc4b58efa0019eb89a28ec4d9f9b463bb74a (patch)
tree5c26a388af7712d36df6c50640de59338ef1794c /apps
parent993545b4fb375bd0dc5be407fa8e23bfc4fd9e20 (diff)
downloadrockbox-363dbc4b58efa0019eb89a28ec4d9f9b463bb74a.zip
rockbox-363dbc4b58efa0019eb89a28ec4d9f9b463bb74a.tar.gz
rockbox-363dbc4b58efa0019eb89a28ec4d9f9b463bb74a.tar.bz2
rockbox-363dbc4b58efa0019eb89a28ec4d9f9b463bb74a.tar.xz
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
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 0566119..26eec2b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -24,6 +24,8 @@
* 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
* starting from an offset works. */
+/* This is also necesary to prevent the problem with buffer overwriting on
+ * automatic track changes */
#include <stdio.h>
#include <string.h>
@@ -1761,7 +1763,8 @@ static void initialize_buffer_fill(bool clear_tracks, bool short_fill)
else if (!filling_short)
{
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 */