Make setjmp in jpeg code thread safe.

This commit is contained in:
Steve Herrell
2010-12-07 11:25:37 -05:00
parent f4796cc776
commit dca28c8f6e
6 changed files with 115 additions and 88 deletions

View File

@@ -22,12 +22,14 @@
#include <stdio.h>
#include <jpeglib.h>
#include <jerror.h>
#include "jpeg.h"
/* Expanded data source object for memory input */
typedef struct {
struct jpeg_source_mgr pub; /* public fields */
struct jpeg_source_mgr pub; /* public fields */
jmp_buf error_jmp_buf; /* error handler for this instance */
JOCTET eoi_buffer[2]; /* a place to put a dummy EOI */
} my_source_mgr;