summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2005-07-01 12:06:30 +0000
committerHardeep Sidhu <dyp@pobox.com>2005-07-01 12:06:30 +0000
commitc8ce78aa906f666fe6188c4ea535464b24e6618d (patch)
tree755ca003e8a5015cf570af2f79e7dfed5077c6c3
parent71d2281d8bbed904f0ba6051423022f31b5197c2 (diff)
Don't update playlist when no tracks in memory. Fixes looping bug when repeat shuffle is enabled in a directory that contains only invalid tracks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6964 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/mpeg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 1698900e9d..9e61e02e00 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -882,9 +882,13 @@ static void track_change(void)
/* Reset the AVC */
sound_set(SOUND_AVC, -1);
#endif /* #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
- remove_current_tag();
- update_playlist();
+ if (num_tracks_in_memory() > 0)
+ {
+ remove_current_tag();
+ update_playlist();
+ }
+
current_track_counter++;
}