diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2023-10-30 00:53:00 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2023-10-30 02:07:01 +0100 |
commit | 45746934c49ee151051be55b8ef6187d82edba36 (patch) | |
tree | 366035517d84370fb9a850e4895e18ac6d91f559 | |
parent | 1651254ba4db1d949bb2d58dd742a846b1e910b1 (diff) | |
download | rockbox-45746934c4.tar.gz rockbox-45746934c4.zip |
playlist_set_current: Fix outdated dircache filerefs
Entries from a previously playing playlist may not
have been replaced after selecting a track from
a different playlist in the Playlist Viewer when
playback was stopped (not paused), since the index
buffer of a playlist opened in the Playlist Viewer
is shared with the current playlist when nothing is
playing.
Change-Id: I939e302c73cabd0e9d969550143635e54db32bf0
-rw-r--r-- | apps/playlist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index b82736bbac..599022817d 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -3509,11 +3509,9 @@ int playlist_set_current(struct playlist_info* playlist) current_playlist.dirlen = playlist->dirlen; if (playlist->indices && playlist->indices != current_playlist.indices) - { memcpy((void*)current_playlist.indices, (void*)playlist->indices, playlist->max_playlist_size*sizeof(*playlist->indices)); - dc_init_filerefs(¤t_playlist, 0, current_playlist.max_playlist_size); - } + dc_init_filerefs(¤t_playlist, 0, current_playlist.max_playlist_size); current_playlist.first_index = playlist->first_index; current_playlist.amount = playlist->amount; |