Priority overriding was not working correctly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11573 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-11-22 10:46:38 +00:00
parent fbac4f8444
commit e3b0937a4a

View file

@ -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)
{