diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mpeg.c | 22 |
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; |