From a2c94cf0b3d2f598adf58984b42f06c386d78ded Mon Sep 17 00:00:00 2001 From: philippe44 Date: Thu, 8 Sep 2022 13:35:49 -0700 Subject: [PATCH] workaround for JPEG issue - release --- components/squeezelite/displayer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/squeezelite/displayer.c b/components/squeezelite/displayer.c index b3354809..c4081590 100644 --- a/components/squeezelite/displayer.c +++ b/components/squeezelite/displayer.c @@ -876,7 +876,9 @@ static void grfa_handler(u8_t *data, int len) { if (artwork.size == length) { GDS_ClearWindow(display, artwork.x, artwork.y, -1, -1, GDS_COLOR_BLACK); xSemaphoreTake(displayer.mutex, portMAX_DELAY); - GDS_DrawJPEG(display, artwork.data, artwork.x, artwork.y, artwork.y < displayer.height ? (GDS_IMAGE_RIGHT | GDS_IMAGE_TOP) : GDS_IMAGE_CENTER); + for (int i = 0; i < 2 && !GDS_DrawJPEG(display, artwork.data, artwork.x, artwork.y, artwork.y < displayer.height ? (GDS_IMAGE_RIGHT | GDS_IMAGE_TOP) : GDS_IMAGE_CENTER); i++) { + LOG_WARN("JPEG decoding error, pass %d", i+1); + } xSemaphoreGive(displayer.mutex); free(artwork.data); artwork.data = NULL;