diff options
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) { |