diff options
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index e4ea8d67e7..092447fe2d 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -862,14 +862,15 @@ static void stop_playing(void) | |||
862 | 862 | ||
863 | static void update_playlist(void) | 863 | static void update_playlist(void) |
864 | { | 864 | { |
865 | int index; | ||
866 | struct trackdata *track; | ||
867 | |||
868 | if (num_tracks_in_memory() > 0) | 865 | if (num_tracks_in_memory() > 0) |
869 | { | 866 | { |
870 | track = get_trackdata(0); | 867 | struct trackdata *track = get_trackdata(0); |
871 | index = playlist_next(track->id3.index); | 868 | track->id3.index = playlist_next(track->id3.index); |
872 | track->id3.index = index; | 869 | } |
870 | else | ||
871 | { | ||
872 | /* End of playlist */ | ||
873 | playlist_next(playlist_amount()); | ||
873 | } | 874 | } |
874 | } | 875 | } |
875 | 876 | ||
@@ -1189,6 +1190,9 @@ static void mpeg_thread(void) | |||
1189 | if (new_file(1) < 0) { | 1190 | if (new_file(1) < 0) { |
1190 | DEBUGF("No more files to play\n"); | 1191 | DEBUGF("No more files to play\n"); |
1191 | filling = false; | 1192 | filling = false; |
1193 | |||
1194 | update_playlist(); | ||
1195 | current_track_counter++; | ||
1192 | } else { | 1196 | } else { |
1193 | /* Make it read more data */ | 1197 | /* Make it read more data */ |
1194 | filling = true; | 1198 | filling = true; |