Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 69725a47 authored by Glenn Maynard's avatar Glenn Maynard Committed by Steve Kondik
Browse files

Fix FLAC decoder lock contention.

The FLAC decoder is doing everything with the lock held, so the only
time it ever releases the lock when playing is for a few cycles between
each loop.  This prevents other threads from ever acquiring the lock.
This can cause other threads to wait for the lock indefinitely.

Handle decoding like the other decoder classes: do the brief read and
decode with the lock held, then release the lock while making the
blocking call to write data to the audio sink.

Fixes media player ANRs with NORMALIZED_SLEEPER=0, and generally
unresponsive media API calls in any case when this decoder is in use.
parent 26ed7aeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment