diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-10-15 13:07:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-10-15 13:07:32 +0000 |
commit | 3aab18a5e8aa0fd3c14386ec6b197d93a20c9c3f (patch) | |
tree | 86bff85acdc4e481459c030f7a54ca11bad0aa5e /firmware/mpeg.c | |
parent | 79c4aa0be4791aed68baebbadb6cd2197adca189 (diff) |
Prevent the simulator from locking on play in a dir with all-empty files.
This doesn't do quite the same as the real code, but at least it doesn't
loop forever now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2664 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 606b724241..a6c6783beb 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -1512,7 +1512,8 @@ void mpeg_play(int offset) break; if(mp3info(&taginfo, trackname)) { /* bad mp3, move on */ - steps++; + if(++steps > playlist_amount()) + break; continue; } playlist_next(steps); @@ -1575,7 +1576,8 @@ void mpeg_next(void) if(!file) break; if(mp3info(&taginfo, file)) { - steps++; + if(++steps > playlist_amount()) + break; continue; } index = playlist_next(steps); |