diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/playback.c b/apps/playback.c index 9a7c9e2bf6..f23c8126d4 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1917,8 +1917,11 @@ static void audio_clear_track_entries( | |||
1917 | /* If there is an unbuffer callback, call it, otherwise, | 1917 | /* If there is an unbuffer callback, call it, otherwise, |
1918 | * just clear the track */ | 1918 | * just clear the track */ |
1919 | if (track_unbuffer_callback) | 1919 | if (track_unbuffer_callback) |
1920 | { | ||
1921 | yield_codecs(); | ||
1920 | track_unbuffer_callback(&tracks[last_idx].id3, false); | 1922 | track_unbuffer_callback(&tracks[last_idx].id3, false); |
1921 | 1923 | } | |
1924 | |||
1922 | memset(&tracks[last_idx], 0, sizeof(struct track_info)); | 1925 | memset(&tracks[last_idx], 0, sizeof(struct track_info)); |
1923 | } | 1926 | } |
1924 | last_idx = cur_idx; | 1927 | last_idx = cur_idx; |
@@ -1982,6 +1985,7 @@ static void audio_stop_playback(void) | |||
1982 | } | 1985 | } |
1983 | 1986 | ||
1984 | /* Mark all entries null. */ | 1987 | /* Mark all entries null. */ |
1988 | audio_clear_track_entries(true, false); | ||
1985 | memset(tracks, 0, sizeof(struct track_info) * MAX_TRACK); | 1989 | memset(tracks, 0, sizeof(struct track_info) * MAX_TRACK); |
1986 | } | 1990 | } |
1987 | 1991 | ||
@@ -2335,7 +2339,6 @@ void audio_thread(void) | |||
2335 | 2339 | ||
2336 | case Q_AUDIO_STOP: | 2340 | case Q_AUDIO_STOP: |
2337 | logf("audio_stop"); | 2341 | logf("audio_stop"); |
2338 | audio_clear_track_entries(true, false); | ||
2339 | audio_stop_playback(); | 2342 | audio_stop_playback(); |
2340 | break ; | 2343 | break ; |
2341 | 2344 | ||