diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-12 01:27:24 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-12 01:27:53 +0100 |
commit | b868e76a1573c4f112477c8b38fbe1e82685ac88 (patch) | |
tree | 4bfe05b0eab7a0f8bb886caad5dcebb96cdd0100 | |
parent | 2147dba8c433c48058b815f5cffd525dd11ddccc (diff) | |
download | fiv-b868e76a1573c4f112477c8b38fbe1e82685ac88.tar.gz fiv-b868e76a1573c4f112477c8b38fbe1e82685ac88.tar.xz fiv-b868e76a1573c4f112477c8b38fbe1e82685ac88.zip |
Ignore libjpeg-turbo warnings
-rw-r--r-- | fastiv-io.c | 12 |
1 files 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) { |