diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/mpeg.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 2ad708d6d7..e801f9c845 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -839,7 +839,18 @@ static int add_track_to_tag_list(const char *filename) | |||
839 | static int new_file(int steps) | 839 | static int new_file(int steps) |
840 | { | 840 | { |
841 | int max_steps = playlist_amount(); | 841 | int max_steps = playlist_amount(); |
842 | int start = num_tracks_in_memory() - 1; | 842 | int start = 0; |
843 | int i; | ||
844 | |||
845 | /* Find out how many steps to advance. Each loaded tag has a "steps" member | ||
846 | that tells us how many playlist entries it had to skip to get to | ||
847 | a valid one. We add those together to find out where to start. */ | ||
848 | i = tag_read_idx; | ||
849 | while(i != tag_write_idx) | ||
850 | { | ||
851 | start += id3tags[i]->id3.index; | ||
852 | i = (i+1) & MAX_ID3_TAGS_MASK; | ||
853 | } | ||
843 | 854 | ||
844 | if (start < 0) | 855 | if (start < 0) |
845 | start = 0; | 856 | start = 0; |