aboutsummaryrefslogtreecommitdiff
path: root/fastiv-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fastiv-io.c')
-rw-r--r--fastiv-io.c12
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) {