diff --git a/apps/buffering.c b/apps/buffering.c index 81b861ccf1..bf41544c56 100644 --- a/apps/buffering.c +++ b/apps/buffering.c @@ -975,8 +975,14 @@ int bufopen(const char *file, off_t offset, enum data_type type, * TODO: don't add unncessary overhead for .bmp images! */ size += JPEG_DECODE_OVERHEAD; #endif - } + /* resize_on_load requires space for 1 line + 2 spare lines */ +#ifdef HAVE_LCD_COLOR + size += sizeof(struct uint32_argb) * 3 * aa->dim->width; +#else + size += sizeof(uint32_t) * 3 * aa->dim->width; #endif + } +#endif /* HAVE_ALBUMART */ if (size == 0) size = filesize(fd); diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c index 34d543b56e..eccd781f9b 100644 --- a/apps/recorder/jpeg_load.c +++ b/apps/recorder/jpeg_load.c @@ -2231,7 +2231,7 @@ int read_jpeg_fd(int fd, const size_t JPEG_DECODE_OVERHEAD = /* Reserve an arbitrary amount for the decode buffer * FIXME: Somebody who knows what they're doing should look at this */ - (32 * 1024) + (38 * 1024) #ifndef JPEG_FROM_MEM /* Unless the struct jpeg is defined statically, we need to allocate * it in the bitmap buffer as well */