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 | |
parent | 79c4aa0be4791aed68baebbadb6cd2197adca189 (diff) | |
download | rockbox-3aab18a5e8aa0fd3c14386ec6b197d93a20c9c3f.tar.gz rockbox-3aab18a5e8aa0fd3c14386ec6b197d93a20c9c3f.zip |
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')
-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) | |||
1512 | break; | 1512 | break; |
1513 | if(mp3info(&taginfo, trackname)) { | 1513 | if(mp3info(&taginfo, trackname)) { |
1514 | /* bad mp3, move on */ | 1514 | /* bad mp3, move on */ |
1515 | steps++; | 1515 | if(++steps > playlist_amount()) |
1516 | break; | ||
1516 | continue; | 1517 | continue; |
1517 | } | 1518 | } |
1518 | playlist_next(steps); | 1519 | playlist_next(steps); |
@@ -1575,7 +1576,8 @@ void mpeg_next(void) | |||
1575 | if(!file) | 1576 | if(!file) |
1576 | break; | 1577 | break; |
1577 | if(mp3info(&taginfo, file)) { | 1578 | if(mp3info(&taginfo, file)) { |
1578 | steps++; | 1579 | if(++steps > playlist_amount()) |
1580 | break; | ||
1579 | continue; | 1581 | continue; |
1580 | } | 1582 | } |
1581 | index = playlist_next(steps); | 1583 | index = playlist_next(steps); |