summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playback.c')
-rwxr-xr-x[-rw-r--r--]apps/playback.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 31aed2abe1..5419888c27 100644..100755
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1689,7 +1689,7 @@ static bool audio_load_cuesheet(struct track_info *infop,
#ifdef HAVE_ALBUMART
/* Load any album art for the file - returns false if the buffer is full */
-static bool audio_load_albumart(struct track_info *infop,
+static int audio_load_albumart(struct track_info *infop,
struct mp3entry *track_id3)
{
FOREACH_ALBUMART(i)
@@ -1730,7 +1730,11 @@ static bool audio_load_albumart(struct track_info *infop,
if (hid == ERR_BUFFER_FULL)
{
logf("buffer is full for now (%s)", __func__);
- return false;
+ return ERR_BUFFER_FULL;
+ }
+ else if (hid == ERR_BITMAP_TOO_LARGE){
+ logf("image is too large to fit in buffer (%s)", __func__);
+ return ERR_BITMAP_TOO_LARGE;
}
else
{
@@ -1981,7 +1985,12 @@ static int audio_finish_load_track(struct track_info *infop)
#ifdef HAVE_ALBUMART
/* Try to load album art for the track */
- if (!audio_load_albumart(infop, track_id3))
+ int retval = audio_load_albumart(infop, track_id3);
+ if (retval == ERR_BITMAP_TOO_LARGE)
+ {
+ /* No space for album art on buffer because the file is larger than the buffer.
+ Ignore the file and keep buffering */
+ } else if (retval == ERR_BUFFER_FULL)
{
/* No space for album art on buffer, not an error */
filling = STATE_FULL;