diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-11-22 10:46:38 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-11-22 10:46:38 +0000 |
commit | e3b0937a4a6f9b79405b5214f7640e0da53236b6 (patch) | |
tree | d9d6f0b457b41cf97a953357af1bf46f266fe2bc /apps | |
parent | fbac4f84442b0e2a5cc9c0845ccabf0af554e82a (diff) |
Priority overriding was not working correctly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11573 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pcmbuf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 347a9fa8fb..e87d27f261 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -240,10 +240,14 @@ static void pcmbuf_under_watermark(void) #ifdef HAVE_PRIORITY_SCHEDULING static int old_priority = 0; - if (LOW_DATA(2) && !old_priority && pcm_is_playing()) + if (LOW_DATA(2) && pcm_is_playing()) { - /* Buffer is critically low so override UI priority. */ - old_priority = thread_set_priority(codec_thread_p, PRIORITY_REALTIME); + if (!old_priority) + { + /* Buffer is critically low so override UI priority. */ + old_priority = thread_set_priority(codec_thread_p, + PRIORITY_REALTIME); + } } else if (old_priority) { |