From b868e76a1573c4f112477c8b38fbe1e82685ac88 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sun, 12 Dec 2021 01:27:24 +0100 Subject: Ignore libjpeg-turbo warnings --- fastiv-io.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fastiv-io.c b/fastiv-io.c index 372a9f0..87e26b3 100644 --- a/fastiv-io.c +++ b/fastiv-io.c @@ -741,10 +741,14 @@ open_libjpeg_turbo(const gchar *data, gsize len, GError **error) if (tjDecompress2(dec, (const unsigned char *) data, len, cairo_image_surface_get_data(surface), width, stride, height, pixel_format, TJFLAG_ACCURATEDCT)) { - set_error(error, tjGetErrorStr2(dec)); - cairo_surface_destroy(surface); - tjDestroy(dec); - return NULL; + if (tjGetErrorCode(dec) == TJERR_WARNING) { + g_warning("%s", tjGetErrorStr2(dec)); + } else { + set_error(error, tjGetErrorStr2(dec)); + cairo_surface_destroy(surface); + tjDestroy(dec); + return NULL; + } } if (pixel_format == TJPF_CMYK) { -- cgit v1.2.3-70-g09d2