forked from len0rd/rockbox
Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename buffer), so frequent calls from the main thread would cause the audio thread to buffer the wrong track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27773 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
de44ae7efc
commit
113764d9c0
5 changed files with 19 additions and 13 deletions
|
|
@ -218,7 +218,7 @@ void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *view
|
|||
int x, length, alignment = SKIN_TOKEN_ALIGN_LEFT;
|
||||
|
||||
struct mp3entry *pid3;
|
||||
char buf[MAX_PATH*2], tempbuf[MAX_PATH];
|
||||
char buf[MAX_PATH*2], tempbuf[MAX_PATH], filename_buf[MAX_PATH + 1];
|
||||
const char *filename;
|
||||
#if CONFIG_TUNER
|
||||
if (current_screen() == GO_TO_FM)
|
||||
|
|
@ -249,7 +249,8 @@ void draw_playlist_viewer_list(struct gui_wps *gwps, struct playlistviewer *view
|
|||
else
|
||||
#endif
|
||||
{
|
||||
filename = playlist_peek(i-cur_pos);
|
||||
filename = playlist_peek(i-cur_pos, filename_buf,
|
||||
sizeof(filename_buf));
|
||||
if (i == cur_pos)
|
||||
{
|
||||
pid3 = state->id3;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue