forked from len0rd/rockbox
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
This commit is contained in:
parent
3625dedcce
commit
57392acd18
1 changed files with 13 additions and 9 deletions
|
|
@ -1246,17 +1246,17 @@ void mpeg_play(int offset)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
trackname = playlist_next( steps, NULL );
|
trackname = playlist_next( steps, NULL );
|
||||||
if ( trackname ) {
|
if (!trackname)
|
||||||
if(mp3info(&taginfo, trackname)) {
|
|
||||||
/* bad mp3, move on */
|
|
||||||
steps++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
taginfo.offset = offset;
|
|
||||||
set_elapsed(&taginfo);
|
|
||||||
playing = true;
|
|
||||||
break;
|
break;
|
||||||
|
if(mp3info(&taginfo, trackname)) {
|
||||||
|
/* bad mp3, move on */
|
||||||
|
steps++;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
taginfo.offset = offset;
|
||||||
|
set_elapsed(&taginfo);
|
||||||
|
playing = true;
|
||||||
|
break;
|
||||||
} while(1);
|
} while(1);
|
||||||
#else
|
#else
|
||||||
queue_post(&mpeg_queue, MPEG_PLAY, (void*)offset);
|
queue_post(&mpeg_queue, MPEG_PLAY, (void*)offset);
|
||||||
|
|
@ -1302,6 +1302,8 @@ void mpeg_next(void)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
file = playlist_next(steps, NULL);
|
file = playlist_next(steps, NULL);
|
||||||
|
if(!file)
|
||||||
|
break;
|
||||||
if(mp3info(&taginfo, file)) {
|
if(mp3info(&taginfo, file)) {
|
||||||
steps++;
|
steps++;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1323,6 +1325,8 @@ void mpeg_prev(void)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
file = playlist_next(steps, NULL);
|
file = playlist_next(steps, NULL);
|
||||||
|
if(!file)
|
||||||
|
break;
|
||||||
if(mp3info(&taginfo, file)) {
|
if(mp3info(&taginfo, file)) {
|
||||||
steps--;
|
steps--;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue