summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2008-01-09 20:37:36 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2008-01-09 20:37:36 +0000
commitca243ce4941dbc23ee1c546fd7d87cc19caf716d (patch)
treec87fa5b126a4557886d0b2ff1e85b13f8637e46b /apps/playback.c
parent66cd9ef38570125750c0fc5a62a1108ee9f1858b (diff)
downloadrockbox-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/playback.c')
-rw-r--r--apps/playback.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index ed581cd36a..87773f89ef 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1375,9 +1375,12 @@ static void codec_thread(void)
1375 { 1375 {
1376 const char *codec_fn = 1376 const char *codec_fn =
1377 get_codec_filename(curtrack_id3.codectype); 1377 get_codec_filename(curtrack_id3.codectype);
1378 LOGFQUEUE("codec > codec Q_CODEC_LOAD_DISK"); 1378 if (codec_fn)
1379 queue_post(&codec_queue, Q_CODEC_LOAD_DISK, 1379 {
1380 (intptr_t)codec_fn); 1380 LOGFQUEUE("codec > codec Q_CODEC_LOAD_DISK");
1381 queue_post(&codec_queue, Q_CODEC_LOAD_DISK,
1382 (intptr_t)codec_fn);
1383 }
1381 } 1384 }
1382 } 1385 }
1383 break; 1386 break;