summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-04-03 15:30:42 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-04-03 15:30:42 +0000
commita3ed95247c7ae0a3240863d1af2cbf1e066799c1 (patch)
tree301cc84789b19ed672bafecfe2d1a09058206b1e /apps/playback.c
parentb24ed65fafd98b272e883f5c222dbb2c21a66c0c (diff)
downloadrockbox-a3ed95247c7ae0a3240863d1af2cbf1e066799c1.tar.gz
rockbox-a3ed95247c7ae0a3240863d1af2cbf1e066799c1.zip
Fix an issue introduced by r16930 where rebuffering would happen one track too early because track were counted after moving to the next one instead of before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 2875f44505..119e37a073 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1853,6 +1853,7 @@ static void audio_rebuffer(void)
1853 of the track transition. */ 1853 of the track transition. */
1854static int audio_check_new_track(void) 1854static int audio_check_new_track(void)
1855{ 1855{
1856 int track_count = audio_track_count();
1856 int old_track_ridx = track_ridx; 1857 int old_track_ridx = track_ridx;
1857 int i, idx; 1858 int i, idx;
1858 bool forward; 1859 bool forward;
@@ -1958,7 +1959,6 @@ static int audio_check_new_track(void)
1958 } 1959 }
1959 1960
1960 /* If it is not safe to even skip this many track entries */ 1961 /* If it is not safe to even skip this many track entries */
1961 int track_count = audio_track_count();
1962 if (ci.new_track >= track_count || ci.new_track <= track_count - MAX_TRACK) 1962 if (ci.new_track >= track_count || ci.new_track <= track_count - MAX_TRACK)
1963 { 1963 {
1964 ci.new_track = 0; 1964 ci.new_track = 0;