diff options
-rw-r--r-- | apps/playback.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c index 20b3e76af0..fd60af2b6d 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -206,6 +206,7 @@ static int buffer_state = BUFFER_STATE_TRASHED; /* Buffer state */ | |||
206 | static struct mp3entry prevtrack_id3; | 206 | static struct mp3entry prevtrack_id3; |
207 | static struct mp3entry curtrack_id3; | 207 | static struct mp3entry curtrack_id3; |
208 | static struct mp3entry nexttrack_id3; | 208 | static struct mp3entry nexttrack_id3; |
209 | static struct mp3entry lasttrack_id3; | ||
209 | 210 | ||
210 | /* Track info structure about songs in the file buffer (A/C-) */ | 211 | /* Track info structure about songs in the file buffer (A/C-) */ |
211 | struct track_info { | 212 | struct track_info { |
@@ -684,6 +685,9 @@ struct mp3entry* audio_next_track(void) | |||
684 | next_idx++; | 685 | next_idx++; |
685 | next_idx &= MAX_TRACK_MASK; | 686 | next_idx &= MAX_TRACK_MASK; |
686 | 687 | ||
688 | if (next_idx == track_widx) | ||
689 | return &lasttrack_id3; | ||
690 | |||
687 | if (tracks[next_idx].id3_hid < 0) | 691 | if (tracks[next_idx].id3_hid < 0) |
688 | return NULL; | 692 | return NULL; |
689 | 693 | ||
@@ -2304,6 +2308,7 @@ static bool audio_load_track(int offset, bool start_play) | |||
2304 | { | 2308 | { |
2305 | last_peek_offset--; | 2309 | last_peek_offset--; |
2306 | close(fd); | 2310 | close(fd); |
2311 | copy_mp3entry(&lasttrack_id3, &id3); | ||
2307 | return false; | 2312 | return false; |
2308 | } | 2313 | } |
2309 | 2314 | ||