rockbox/apps/radio
Michael Giacomelli ca09f91f64 Fix deadlocks when trying to buffer large album art.
Internally, buffering tries to load the entire album art file into the
audio buffer, which will fail if the file is larger than the buffer.
Playback.c interprets a file failing to buffer to mean that the buffer
is full, so it waits for more space and tries again.  This results in a
deadlock since the file will never fit.

Change bufopen to return a new error condition when an image file will
not fit on the buffer because it is too large:  ERR_BITMAP_TOO_LARGE.
Note that we arbitrarily set "too large" to be within 64KB of the
entire buffer size or larger, this could be adjusted if needed.

Change audio_load_albumart to pass through error messages from bufopen.

In playback.c, check to see why audio_load_albumart fails.  If it fails
because the file is too large to buffer, simply ignore the file.  If it
fails because the file would fit but the buffer is full, try again
later.

Change-Id: I66799ae26f124b495e1522fce7285332f4cf986f
2020-12-25 17:47:19 +00:00
..
presets.c get rid of ACTION_F3 (leftover from Archos days) 2020-10-08 19:20:47 -04:00
presets.h
radio.c Fix volume handling of steps in radio 2020-10-29 20:26:30 -04:00
radio.h
radio_skin.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
radioart.c Fix deadlocks when trying to buffer large album art. 2020-12-25 17:47:19 +00:00