diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-01-17 22:28:36 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-01-17 22:28:36 +0000 |
commit | d2cc5ce58e875a28742ab2fb1707e195b7fc1e34 (patch) | |
tree | 7e874330a1db76711d63d76bc77204032c8296b4 /apps | |
parent | 0171408408cfaf074a8c2f2c3eddbae658e45e6c (diff) | |
download | rockbox-d2cc5ce58e875a28742ab2fb1707e195b7fc1e34.tar.gz rockbox-d2cc5ce58e875a28742ab2fb1707e195b7fc1e34.zip |
Fix player becoming unresponsive on Stop / Pause in some cases.
Fix for FS#11856: In tagtree_buffer_event, do not wait for database to
come online as that may never happen. Rather, wait until it either
has come online or has decided that this will never happen. Added a
new function to tagcache.c to export this information.
Flyspray: FS#11865
Author: Michael Hohmuth
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29081 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tagcache.c | 4 | ||||
-rw-r--r-- | apps/tagcache.h | 1 | ||||
-rw-r--r-- | apps/tagtree.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index b3a16a3c42..50c6253522 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -4746,6 +4746,10 @@ bool tagcache_is_initialized(void) | |||
4746 | { | 4746 | { |
4747 | return tc_stat.initialized; | 4747 | return tc_stat.initialized; |
4748 | } | 4748 | } |
4749 | bool tagcache_is_fully_initialized(void) | ||
4750 | { | ||
4751 | return tc_stat.readyvalid; | ||
4752 | } | ||
4749 | bool tagcache_is_usable(void) | 4753 | bool tagcache_is_usable(void) |
4750 | { | 4754 | { |
4751 | return tc_stat.initialized && tc_stat.ready; | 4755 | return tc_stat.initialized && tc_stat.ready; |
diff --git a/apps/tagcache.h b/apps/tagcache.h index 4fffccae2f..8c09063fb9 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -247,6 +247,7 @@ void tagcache_unload_ramcache(void); | |||
247 | #endif | 247 | #endif |
248 | void tagcache_init(void) INIT_ATTR; | 248 | void tagcache_init(void) INIT_ATTR; |
249 | bool tagcache_is_initialized(void); | 249 | bool tagcache_is_initialized(void); |
250 | bool tagcache_is_fully_initialized(void); | ||
250 | bool tagcache_is_usable(void); | 251 | bool tagcache_is_usable(void); |
251 | void tagcache_start_scan(void); | 252 | void tagcache_start_scan(void); |
252 | void tagcache_stop_scan(void); | 253 | void tagcache_stop_scan(void); |
diff --git a/apps/tagtree.c b/apps/tagtree.c index 4673af38cf..fa88a5941b 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -659,7 +659,7 @@ static void tagtree_buffer_event(void *data) | |||
659 | 659 | ||
660 | logf("be:%s", id3->path); | 660 | logf("be:%s", id3->path); |
661 | 661 | ||
662 | while (! tagcache_is_usable()) | 662 | while (! tagcache_is_fully_initialized()) |
663 | yield(); | 663 | yield(); |
664 | 664 | ||
665 | if (!tagcache_find_index(&tcs, id3->path)) | 665 | if (!tagcache_find_index(&tcs, id3->path)) |