Fix FS#5797 (Codec failure with directory skip when in file browser, with dircache enabled). Marking the tree context to be reloaded too early would cause the new playlist to contain files that don't exist (correct directory but wrong filenames), in turn causing the codec failures. The fix is to call reload_directory() after the playlist has been created.
I also added a sanity check to avoid loading an unknown codec, which was happening as a consequence of this issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16039 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
66cd9ef385
commit
ca243ce494
2 changed files with 11 additions and 8 deletions
|
@ -1375,9 +1375,12 @@ static void codec_thread(void)
|
|||
{
|
||||
const char *codec_fn =
|
||||
get_codec_filename(curtrack_id3.codectype);
|
||||
LOGFQUEUE("codec > codec Q_CODEC_LOAD_DISK");
|
||||
queue_post(&codec_queue, Q_CODEC_LOAD_DISK,
|
||||
(intptr_t)codec_fn);
|
||||
if (codec_fn)
|
||||
{
|
||||
LOGFQUEUE("codec > codec Q_CODEC_LOAD_DISK");
|
||||
queue_post(&codec_queue, Q_CODEC_LOAD_DISK,
|
||||
(intptr_t)codec_fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -654,8 +654,12 @@ static int create_and_play_dir(int direction, bool play_last)
|
|||
playlist_start(index, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* we've overwritten the dircache when getting the next/previous dir,
|
||||
so the tree browser context will need to be reloaded */
|
||||
reload_directory();
|
||||
}
|
||||
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
@ -1577,10 +1581,6 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion)
|
|||
}
|
||||
}
|
||||
|
||||
/* we've overwritten the dircache so tree browser will need to be
|
||||
reloaded */
|
||||
reload_directory();
|
||||
|
||||
/* restore dirfilter & sort_dir */
|
||||
*(tc->dirfilter) = dirfilter;
|
||||
global_settings.sort_dir = sort_dir;
|
||||
|
|
Loading…
Reference in a new issue