Ignore libjpeg-turbo warnings

This commit is contained in:
Přemysl Eric Janouch 2021-12-12 01:27:24 +01:00
parent 2147dba8c4
commit b868e76a15
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 8 additions and 4 deletions

View File

@ -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) {