[gegl] jpg-load: Set cinfo.err before calling jpeg_start_decompress()
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] jpg-load: Set cinfo.err before calling jpeg_start_decompress()
- Date: Sat, 20 Dec 2014 11:06:36 +0000 (UTC)
commit 660a6f5a543570b3b4b12d64911229c2b1afcab0
Author: Mukund Sivaraman <muks banu com>
Date: Sat Dec 20 16:17:06 2014 +0530
jpg-load: Set cinfo.err before calling jpeg_start_decompress()
operations/external/jpg-load.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/jpg-load.c b/operations/external/jpg-load.c
index f241831..8cbaca6 100644
--- a/operations/external/jpg-load.c
+++ b/operations/external/jpg-load.c
@@ -180,8 +180,9 @@ gegl_jpg_load_query_jpg (GInputStream *stream,
const Babl *format = NULL;
GioSource gio_source = { stream, NULL, 1024 };
- jpeg_create_decompress (&cinfo);
cinfo.err = jpeg_std_error (&jerr);
+ jpeg_create_decompress (&cinfo);
+
gio_source_enable(&cinfo, &src, &gio_source);
(void) jpeg_read_header (&cinfo, TRUE);
@@ -221,8 +222,9 @@ gegl_jpg_load_buffer_import_jpg (GeglBuffer *gegl_buffer,
gboolean is_inverted_cmyk = FALSE;
GioSource gio_source = { stream, NULL, 1024 };
- jpeg_create_decompress (&cinfo);
cinfo.err = jpeg_std_error (&jerr);
+ jpeg_create_decompress (&cinfo);
+
gio_source_enable(&cinfo, &src, &gio_source);
(void) jpeg_read_header (&cinfo, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]