diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-01-09 20:37:36 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-01-09 20:37:36 +0000 |
commit | ca243ce4941dbc23ee1c546fd7d87cc19caf716d (patch) | |
tree | c87fa5b126a4557886d0b2ff1e85b13f8637e46b /apps/playlist.c | |
parent | 66cd9ef38570125750c0fc5a62a1108ee9f1858b (diff) | |
download | rockbox-ca243ce4941dbc23ee1c546fd7d87cc19caf716d.tar.gz rockbox-ca243ce4941dbc23ee1c546fd7d87cc19caf716d.zip |
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
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 644329c5bf..b68a47e75d 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -654,8 +654,12 @@ static int create_and_play_dir(int direction, bool play_last) | |||
654 | playlist_start(index, 0); | 654 | playlist_start(index, 0); |
655 | #endif | 655 | #endif |
656 | } | 656 | } |
657 | |||
658 | /* we've overwritten the dircache when getting the next/previous dir, | ||
659 | so the tree browser context will need to be reloaded */ | ||
660 | reload_directory(); | ||
657 | } | 661 | } |
658 | 662 | ||
659 | return index; | 663 | return index; |
660 | } | 664 | } |
661 | 665 | ||
@@ -1577,10 +1581,6 @@ static int get_next_dir(char *dir, bool is_forward, bool recursion) | |||
1577 | } | 1581 | } |
1578 | } | 1582 | } |
1579 | 1583 | ||
1580 | /* we've overwritten the dircache so tree browser will need to be | ||
1581 | reloaded */ | ||
1582 | reload_directory(); | ||
1583 | |||
1584 | /* restore dirfilter & sort_dir */ | 1584 | /* restore dirfilter & sort_dir */ |
1585 | *(tc->dirfilter) = dirfilter; | 1585 | *(tc->dirfilter) = dirfilter; |
1586 | global_settings.sort_dir = sort_dir; | 1586 | global_settings.sort_dir = sort_dir; |