summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorroman.artiukhin <bahusdrive@gmail.com>2023-11-01 11:21:59 +0200
committerroman.artiukhin <bahusdrive@gmail.com>2023-11-01 16:24:32 +0200
commit63f75d22b4a87b545e49f13beffe23c723aa9712 (patch)
treea39a2540f491fed6ade6bed0decfe68133bfde03 /apps
parent11b8336c64a54e376d22722b7bf8e5af902b9fba (diff)
downloadrockbox-63f75d22b4a87b545e49f13beffe23c723aa9712.tar.gz
rockbox-63f75d22b4a87b545e49f13beffe23c723aa9712.zip
Fix potential stuck on auto track change when buffering is stopped
pcmbuf might wait for next track for proper crossfade/gapeless playback (see pcmbuf_start_track_change). It's not going to happen with stopped buffering. Fixup for 831faa3b (#5394) Change-Id: I969878d13a9f976566eef5b975beb1687b519a37
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 7a2790cbe2..7ea44a047f 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2690,12 +2690,18 @@ static void audio_on_codec_complete(int status)
2690 struct track_info info; 2690 struct track_info info;
2691 bool have_track = track_list_advance_current(1, &info); 2691 bool have_track = track_list_advance_current(1, &info);
2692 2692
2693 if (!have_track || (info.audio_hid < 0 && filling != STATE_STOPPED)) 2693 if (!have_track || info.audio_hid < 0)
2694 { 2694 {
2695 bool end_of_playlist = false; 2695 bool end_of_playlist = false;
2696 2696
2697 if (have_track) 2697 if (have_track)
2698 { 2698 {
2699 if (filling == STATE_STOPPED)
2700 {
2701 audio_begin_track_change(TRACK_CHANGE_END_OF_DATA, trackstat);
2702 return;
2703 }
2704
2699 /* Track load is not complete - it might have stopped on a 2705 /* Track load is not complete - it might have stopped on a
2700 full buffer without reaching the audio handle or we just 2706 full buffer without reaching the audio handle or we just
2701 arrived at it early 2707 arrived at it early