Ignore libjpeg-turbo warnings
This commit is contained in:
parent
2147dba8c4
commit
b868e76a15
@ -741,11 +741,15 @@ open_libjpeg_turbo(const gchar *data, gsize len, GError **error)
|
|||||||
if (tjDecompress2(dec, (const unsigned char *) data, len,
|
if (tjDecompress2(dec, (const unsigned char *) data, len,
|
||||||
cairo_image_surface_get_data(surface), width, stride, height,
|
cairo_image_surface_get_data(surface), width, stride, height,
|
||||||
pixel_format, TJFLAG_ACCURATEDCT)) {
|
pixel_format, TJFLAG_ACCURATEDCT)) {
|
||||||
|
if (tjGetErrorCode(dec) == TJERR_WARNING) {
|
||||||
|
g_warning("%s", tjGetErrorStr2(dec));
|
||||||
|
} else {
|
||||||
set_error(error, tjGetErrorStr2(dec));
|
set_error(error, tjGetErrorStr2(dec));
|
||||||
cairo_surface_destroy(surface);
|
cairo_surface_destroy(surface);
|
||||||
tjDestroy(dec);
|
tjDestroy(dec);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pixel_format == TJPF_CMYK) {
|
if (pixel_format == TJPF_CMYK) {
|
||||||
// CAIRO_STRIDE_ALIGNMENT is 4 bytes, so there will be no padding with
|
// CAIRO_STRIDE_ALIGNMENT is 4 bytes, so there will be no padding with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user