diff options
| author | Magnus Holmgren <magnushol@gmail.com> | 2006-04-30 08:39:24 +0000 |
|---|---|---|
| committer | Magnus Holmgren <magnushol@gmail.com> | 2006-04-30 08:39:24 +0000 |
| commit | e187e01e36e9366846e5c3ec2029cd03159fff35 (patch) | |
| tree | 9a77acc625a4180ff8f3f467b4825304ea872d67 | |
| parent | 3bd4b0be39d124dcaa33e642ce1190f159c99a3e (diff) | |
| download | rockbox-e187e01e36e9366846e5c3ec2029cd03159fff35.zip rockbox-e187e01e36e9366846e5c3ec2029cd03159fff35.tar.gz rockbox-e187e01e36e9366846e5c3ec2029cd03159fff35.tar.bz2 rockbox-e187e01e36e9366846e5c3ec2029cd03159fff35.tar.xz | |
Fix one seeking bug: when seeking back to before a resume point, audio from another track could be played.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9837 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/playback.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c index c6f3086..a2f1672 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1904,16 +1904,20 @@ static void generate_postbuffer_events(void) static void initialize_buffer_fill(bool clear_tracks) { - fill_bytesleft = filebuflen - filebufused; - 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 */ if (filling) return ; logf("Starting buffer fill"); + fill_bytesleft = filebuflen - filebufused; + /* TODO: This doesn't look right, and might explain some problems with + * seeking in large files (to offsets larger than filebuflen). + * And what about buffer wraps? + */ + if (buf_ridx > cur_ti->buf_idx) + cur_ti->start_pos = buf_ridx - cur_ti->buf_idx; + if (clear_tracks) audio_clear_track_entries(true, false); |