1
0
Fork 0
forked from len0rd/rockbox
foxbox/apps
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
..
bitmaps New port: AIGO EROS Q / EROS K 2020-10-11 16:37:17 -04:00
gui skinengine: Make sure logical IF operator doesn't compare a garbage value 2020-12-13 19:21:13 -05:00
hosted/android keyboard add ability to specify temporary custom layouts 2020-07-22 06:48:28 -04:00
iap Update to allow the Apple Radio Remote to function on iPod Video 5G. 2020-07-09 18:02:07 +00:00
keymaps Rocker Add WPS and Tree Hotkey, button codes in debug menu 2020-11-12 01:22:32 -05:00
lang FS#13261: Update Dutch Translation (Issa Beganović) 2020-12-12 13:43:10 -05:00
menus ibasso: Hopefully hack usb into building again. 2020-11-13 20:04:04 -05:00
player [2/4] get rid of HAVE_LCD_CHARCELLS 2020-07-24 21:20:13 +00:00
plugins announce_status: Fix incorrect function prototype definition 2020-12-13 19:19:33 -05:00
radio Fix deadlocks when trying to buffer large album art. 2020-12-25 17:47:19 +00:00
recorder Do not resize images greater than 32767 pixels in either dimension 2020-12-14 04:14:45 +00:00
abrepeat.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
abrepeat.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
action.c Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build. 2020-10-08 20:30:08 -04:00
action.h get rid of ACTION_F3 (leftover from Archos days) 2020-10-08 19:20:47 -04:00
alarm_menu.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
alarm_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
appevents.h Get voice event out of playback.c 2017-12-12 20:28:56 -05:00
applimits.h
apps.make Android: use APPEXTRA instead of makefile hack 2011-03-11 16:08:36 +00:00
audio_path.c nwza860: fix simulator build 2020-10-19 03:39:33 +00:00
audio_thread.c Get voice event out of playback.c 2017-12-12 20:28:56 -05:00
audio_thread.h Update software recording engine to latest codec interface. 2013-06-30 00:40:27 +02:00
beep.c Enable setting of global output samplerate on certain targets. 2013-07-06 04:22:04 +02:00
bookmark.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
bookmark.h Fix minor bookmark problems/Enhance bookmark functions 2012-03-12 08:54:02 +01:00
buffering.c Fix deadlocks when trying to buffer large album art. 2020-12-25 17:47:19 +00:00
buffering.h Fix deadlocks when trying to buffer large album art. 2020-12-25 17:47:19 +00:00
codec_thread.c opus reset decoder on seek completion to prevent stack overflow 2019-08-14 17:54:35 +02:00
codec_thread.h Update software recording engine to latest codec interface. 2013-06-30 00:40:27 +02:00
codecs.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
core_asmdefs.c
cuesheet.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
cuesheet.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
debug_menu.c fix more yellow 2020-10-13 17:23:56 -04:00
debug_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
enc_config.c audio: Add support for 192 and 176KHz playback 2020-09-30 21:37:11 -04:00
enc_config.h Fix menu warnings 2018-10-18 00:06:31 +02:00
features.txt languages: convert recording_swcodec -> recording 2020-11-19 09:52:37 -05:00
filetree.c hosted: Add ROLO support for hosted targets 2020-10-11 14:18:42 +00:00
filetree.h
filetypes.c codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00
filetypes.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
fracmul.h Build librbcodec with DSP and metadata. 2012-03-18 12:00:39 +01:00
keyboard.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
language.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
language.h
logfdisp.c [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
logfdisp.h
main.c Add Invalid Voice Announcement to the voice system FS#13216 2020-09-20 16:08:49 -04:00
menu.c Do_menu allow VOICE_ONLY strings 2020-07-27 03:55:58 +00:00
menu.h do_menu pass internal synclist reference to callback 2020-07-19 22:10:26 +00:00
misc.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
misc.h [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. 2020-07-24 21:20:13 +00:00
onplay.c LCD core move buf ptr and address look up function viewport struct 2020-10-26 12:28:48 -04:00
onplay.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
open_plugin.c Open_plugin add ability to import opx shortcuts, bug fix 2020-08-19 02:06:16 -04:00
open_plugin.h Open Plugin cleanup 2020-08-18 02:07:23 +00:00
pcmbuf.c Fix a problem with audio not starting on a list of short files 2017-04-06 19:32:35 -04:00
pcmbuf.h Fix a problem with audio not starting on a list of short files 2017-04-06 19:32:35 -04:00
playback.c Fix deadlocks when trying to buffer large album art. 2020-12-25 17:47:19 +00:00
playback.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
playlist.c playlist: Fix out-of-bounds array access when the directory is blank 2020-12-13 19:20:38 -05:00
playlist.h [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
playlist_catalog.c keyboard add ability to specify temporary custom layouts 2020-07-22 06:48:28 -04:00
playlist_catalog.h FS#11808 - Major playlist handling changes (on disk playlists) 2011-07-20 14:11:15 +00:00
playlist_menu.h
playlist_viewer.c keyboard add ability to specify temporary custom layouts 2020-07-22 06:48:28 -04:00
playlist_viewer.h FS#11808 - Major playlist handling changes (on disk playlists) 2011-07-20 14:11:15 +00:00
plugin.c plugin: Un-export find_next_frame() 2020-11-12 16:23:27 +00:00
plugin.h plugin: Un-export find_next_frame() 2020-11-12 16:23:27 +00:00
rbcodec_helpers.c Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL 2012-05-09 14:32:38 +02:00
rbcodecconfig.h kernel: Break out kernel primitives into separate files and move to separate dir. 2014-03-03 18:11:57 +01:00
rbcodecplatform.h rbcodec: abstract tdspeed buffer allocation 2012-05-07 10:29:07 +02:00
README
root_menu.c Headphone / lineout pause/resume #FS13237 2020-09-18 00:22:52 +00:00
root_menu.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
screen_access.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screen_access.h Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screens.c Whitespace cleanup on fb_viewport Rewrite 2020-10-26 12:38:22 -04:00
screens.h [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
scrobbler.c hosted: sanitize handling of HOME_DIR 2020-10-11 17:47:34 -04:00
scrobbler.h Get rid of some superfluous single-purpose functions in playback. 2013-07-13 00:08:51 -04:00
settings.c Fix the fix, which managed to make things _worse_ 2020-11-16 12:55:33 -05:00
settings.h usb: Add ability to prompt user about what to do upon usb insertion 2020-11-13 16:44:01 -05:00
settings_list.c lang: Drop all deprecated strings, and rename LANG__NEVER to LANG_NEVER 2020-11-17 11:06:13 -05:00
settings_list.h Add open_plugin to core 2020-08-17 10:15:14 -04:00
shortcuts.c Add open_plugin to core 2020-08-17 10:15:14 -04:00
shortcuts.h shortcuts: talk the time and configure the sleep timeout 2011-12-08 10:23:46 +00:00
sound_menu.h Fix menu warnings 2018-10-18 00:06:31 +02:00
SOURCES New port: AIGO EROS Q / EROS K 2020-10-11 16:37:17 -04:00
status.c [2/4] get rid of HAVE_LCD_CHARCELLS 2020-07-24 21:20:13 +00:00
status.h [2/4] get rid of HAVE_LCD_CHARCELLS 2020-07-24 21:20:13 +00:00
tagcache.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
tagcache.h Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
tagnavi.config FS#12132 patch 7: Add a new default format for untagged tracks: 2011-07-31 16:26:39 +00:00
tagtree.c [3/4] Completely remove HWCODEC support 2020-07-24 21:20:13 +00:00
tagtree.h Fix menu warnings 2018-10-18 00:06:31 +02:00
talk.c Fix compile warnings (set-but-not-used) on big endian targets 2020-10-13 13:37:23 -04:00
talk.h Add Invalid Voice Announcement to the voice system FS#13216 2020-09-20 16:08:49 -04:00
tree.c get rid of ACTION_F3 (leftover from Archos days) 2020-10-08 19:20:47 -04:00
tree.h Fix tree.c->tree_get_entry_at() buffer overflow 2018-12-14 01:28:17 -06:00
usb_keymaps.c remove superfluous ifdef 2011-12-28 19:23:38 +00:00
usb_keymaps.h
voice_thread.c voice: Fix accidental warnings 2020-12-17 13:29:58 -05:00
voice_thread.h Add Invalid Voice Announcement to the voice system FS#13216 2020-09-20 16:08:49 -04:00

For general information see: docs/README
For API information see: docs/API