summarylogtreecommitdiffstats
path: root/output-jpeg.patch
blob: 03006b2a7da748d17ad4749d6111176d72809c43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- output-jpeg.c	2023-02-07 12:48:20.328740181 -1000
+++ output-jpeg.c.new	2023-02-07 12:50:24.268536252 -1000
@@ -28,10 +28,16 @@
 
 #define JZ_CTX_FROM_CINFO(c) (fz_context *)((c)->client_data)
 
+static void fz_jpg_mem_init(j_common_ptr cinfo, fz_context *ctx)
+{
+	cinfo->client_data = ctx;
+}
+
+#define fz_jpg_mem_term(cinfo)
+
 #else /* SHARE_JPEG */
 
 typedef void * backing_store_ptr;
-
 #include "jmemcust.h"
 
 #define JZ_CTX_FROM_CINFO(c) (fz_context *)(GET_CUST_MEM_DATA(c)->priv)
@@ -76,7 +82,7 @@
 	}
 }
 
-#endif
+#endif /* SHARE_JPEG */
 
 #define OUTPUT_BUF_SIZE (16<<10)
 
@@ -92,6 +98,7 @@
 {
 	char msg[JMSG_LENGTH_MAX];
 	fz_context *ctx = JZ_CTX_FROM_CINFO(cinfo);
+
 	cinfo->err->format_message(cinfo, msg);
 	fz_throw(ctx, FZ_ERROR_GENERIC, "jpeg error: %s", msg);
 }