summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-23 07:56:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-23 07:56:36 +0000
commit57392acd18468a4530a63d379cc7534b2640e6b3 (patch)
tree0e8886401766cfe6bd2518ffd6f30ab1eff5560f /firmware/mpeg.c
parent3625dedcce4a0ac81e74b0f0889ee741e7e2c0cf (diff)
downloadrockbox-57392acd18468a4530a63d379cc7534b2640e6b3.tar.gz
rockbox-57392acd18468a4530a63d379cc7534b2640e6b3.zip
the simulator code now deals better with playlist_next() returning NULL
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1941 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index e7c3638da9..6f2b3dfafe 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -1246,17 +1246,17 @@ void mpeg_play(int offset)
1246 1246
1247 do { 1247 do {
1248 trackname = playlist_next( steps, NULL ); 1248 trackname = playlist_next( steps, NULL );
1249 if ( trackname ) { 1249 if (!trackname)
1250 if(mp3info(&taginfo, trackname)) {
1251 /* bad mp3, move on */
1252 steps++;
1253 continue;
1254 }
1255 taginfo.offset = offset;
1256 set_elapsed(&taginfo);
1257 playing = true;
1258 break; 1250 break;
1251 if(mp3info(&taginfo, trackname)) {
1252 /* bad mp3, move on */
1253 steps++;
1254 continue;
1259 } 1255 }
1256 taginfo.offset = offset;
1257 set_elapsed(&taginfo);
1258 playing = true;
1259 break;
1260 } while(1); 1260 } while(1);
1261#else 1261#else
1262 queue_post(&mpeg_queue, MPEG_PLAY, (void*)offset); 1262 queue_post(&mpeg_queue, MPEG_PLAY, (void*)offset);
@@ -1302,6 +1302,8 @@ void mpeg_next(void)
1302 1302
1303 do { 1303 do {
1304 file = playlist_next(steps, NULL); 1304 file = playlist_next(steps, NULL);
1305 if(!file)
1306 break;
1305 if(mp3info(&taginfo, file)) { 1307 if(mp3info(&taginfo, file)) {
1306 steps++; 1308 steps++;
1307 continue; 1309 continue;
@@ -1323,6 +1325,8 @@ void mpeg_prev(void)
1323 1325
1324 do { 1326 do {
1325 file = playlist_next(steps, NULL); 1327 file = playlist_next(steps, NULL);
1328 if(!file)
1329 break;
1326 if(mp3info(&taginfo, file)) { 1330 if(mp3info(&taginfo, file)) {
1327 steps--; 1331 steps--;
1328 continue; 1332 continue;