mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Backport r29081: Fix player becoming unresponsive on Stop / Pause in some cases.
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
This commit is contained in:
parent
b70baf8840
commit
149fb181ca
3 changed files with 6 additions and 1 deletions
|
@ -4645,6 +4645,10 @@ bool tagcache_is_initialized(void)
|
||||||
{
|
{
|
||||||
return tc_stat.initialized;
|
return tc_stat.initialized;
|
||||||
}
|
}
|
||||||
|
bool tagcache_is_fully_initialized(void)
|
||||||
|
{
|
||||||
|
return tc_stat.readyvalid;
|
||||||
|
}
|
||||||
bool tagcache_is_usable(void)
|
bool tagcache_is_usable(void)
|
||||||
{
|
{
|
||||||
return tc_stat.initialized && tc_stat.ready;
|
return tc_stat.initialized && tc_stat.ready;
|
||||||
|
|
|
@ -246,6 +246,7 @@ void tagcache_unload_ramcache(void);
|
||||||
#endif
|
#endif
|
||||||
void tagcache_init(void) INIT_ATTR;
|
void tagcache_init(void) INIT_ATTR;
|
||||||
bool tagcache_is_initialized(void);
|
bool tagcache_is_initialized(void);
|
||||||
|
bool tagcache_is_fully_initialized(void);
|
||||||
bool tagcache_is_usable(void);
|
bool tagcache_is_usable(void);
|
||||||
void tagcache_start_scan(void);
|
void tagcache_start_scan(void);
|
||||||
void tagcache_stop_scan(void);
|
void tagcache_stop_scan(void);
|
||||||
|
|
|
@ -652,7 +652,7 @@ static void tagtree_buffer_event(void *data)
|
||||||
|
|
||||||
logf("be:%s", id3->path);
|
logf("be:%s", id3->path);
|
||||||
|
|
||||||
while (! tagcache_is_usable())
|
while (! tagcache_is_fully_initialized())
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
if (!tagcache_find_index(&tcs, id3->path))
|
if (!tagcache_find_index(&tcs, id3->path))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue