summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-01-24 22:16:30 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-01-24 22:16:30 +0000
commit149fb181caec224cfe0a2473b44cef9e5ff8a5ad (patch)
tree8343dff2805ebc6842b09a7975ef8f8445682431
parentb70baf88403900e8058db9840a6efb933ab758df (diff)
downloadrockbox-v3.7.tar.gz
rockbox-v3.7.zip
Backport r29081: Fix player becoming unresponsive on Stop / Pause in some cases.v3.7
Fix for FS#11865: 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/branches/v3_7@29134 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tagcache.c4
-rw-r--r--apps/tagcache.h1
-rw-r--r--apps/tagtree.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 39ed99fcce..efc779d2e3 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -4645,6 +4645,10 @@ bool tagcache_is_initialized(void)
4645{ 4645{
4646 return tc_stat.initialized; 4646 return tc_stat.initialized;
4647} 4647}
4648bool tagcache_is_fully_initialized(void)
4649{
4650 return tc_stat.readyvalid;
4651}
4648bool tagcache_is_usable(void) 4652bool tagcache_is_usable(void)
4649{ 4653{
4650 return tc_stat.initialized && tc_stat.ready; 4654 return tc_stat.initialized && tc_stat.ready;
diff --git a/apps/tagcache.h b/apps/tagcache.h
index b52da76a0f..19608063c8 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -246,6 +246,7 @@ void tagcache_unload_ramcache(void);
246#endif 246#endif
247void tagcache_init(void) INIT_ATTR; 247void tagcache_init(void) INIT_ATTR;
248bool tagcache_is_initialized(void); 248bool tagcache_is_initialized(void);
249bool tagcache_is_fully_initialized(void);
249bool tagcache_is_usable(void); 250bool tagcache_is_usable(void);
250void tagcache_start_scan(void); 251void tagcache_start_scan(void);
251void tagcache_stop_scan(void); 252void tagcache_stop_scan(void);
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 75caab01d4..0e0536c2fd 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -652,7 +652,7 @@ static void tagtree_buffer_event(void *data)
652 652
653 logf("be:%s", id3->path); 653 logf("be:%s", id3->path);
654 654
655 while (! tagcache_is_usable()) 655 while (! tagcache_is_fully_initialized())
656 yield(); 656 yield();
657 657
658 if (!tagcache_find_index(&tcs, id3->path)) 658 if (!tagcache_find_index(&tcs, id3->path))