Fix FS#5797 (Codec failure with directory skip when in file browser, with dircache...
commit3dc9d192c7c122998fbe447015b613a9241bcc10
authornicolasp <nicolasp@a1c6a512-1295-4272-9138-f99709370657>
Wed, 9 Jan 2008 20:37:36 +0000 (9 20:37 +0000)
committernicolasp <nicolasp@a1c6a512-1295-4272-9138-f99709370657>
Wed, 9 Jan 2008 20:37:36 +0000 (9 20:37 +0000)
treec87fa5b126a4557886d0b2ff1e85b13f8637e46b
parent1c58d54a2ea4d95f34d5d93ccbb04a4bbf0c6595
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
apps/playback.c
apps/playlist.c