diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/apps/playback.c b/apps/playback.c index 25aa1948d6..8b607f30f0 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -611,38 +611,22 @@ static void track_list_free_buf_info(struct track_buf_info *tbip) | |||
611 | return; | 611 | return; |
612 | } | 612 | } |
613 | 613 | ||
614 | /* If this one is the current track; new current track is next one, | ||
615 | if any, else, the previous */ | ||
616 | if (hid == track_list.current_hid) | ||
617 | track_list.current_hid = next_hid > 0 ? next_hid : prev_hid; | ||
618 | |||
619 | /* Fixup list links */ | ||
614 | if (prev_tbip) | 620 | if (prev_tbip) |
615 | { | ||
616 | prev_tbip->link[1] = next_hid; | 621 | prev_tbip->link[1] = next_hid; |
617 | } | ||
618 | else | 622 | else |
619 | { | ||
620 | /* Was the first track; new first track is next one */ | ||
621 | track_list.first_hid = next_hid; | 623 | track_list.first_hid = next_hid; |
622 | 624 | ||
623 | if (hid == track_list.current_hid) | ||
624 | { | ||
625 | /* Was the current track; new current track is next one */ | ||
626 | track_list.current_hid = next_hid; | ||
627 | } | ||
628 | } | ||
629 | |||
630 | if (next_tbip) | 625 | if (next_tbip) |
631 | { | ||
632 | next_tbip->link[0] = prev_hid; | 626 | next_tbip->link[0] = prev_hid; |
633 | } | ||
634 | else | 627 | else |
635 | { | ||
636 | /* Was the last track; new last track is previous one */ | ||
637 | track_list.last_hid = prev_hid; | 628 | track_list.last_hid = prev_hid; |
638 | 629 | ||
639 | if (hid == track_list.current_hid) | ||
640 | { | ||
641 | /* Was the current track; new current track is previous one */ | ||
642 | track_list.current_hid = prev_hid; | ||
643 | } | ||
644 | } | ||
645 | |||
646 | track_list.count--; | 630 | track_list.count--; |
647 | } | 631 | } |
648 | 632 | ||