Fix broken JPEG decoding (tested on Windows)
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
#define MEM_SRCDST_SUPPORTED 1
|
||||
|
||||
/* Use accelerated SIMD routines. */
|
||||
#ifndef __ANDROID__
|
||||
#define WITH_SIMD 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define BITS_IN_JSAMPLE as either
|
||||
@@ -67,9 +69,10 @@
|
||||
#endif
|
||||
|
||||
/* If rpcndr.h has defined boolean, jmorecfg.h should not. */
|
||||
#ifdef __RPCNDR_H__
|
||||
#define HAVE_BOOLEAN
|
||||
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
||||
typedef unsigned char boolean;
|
||||
#endif
|
||||
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
@@ -25,9 +25,19 @@ namespace lime {
|
||||
static void OnOutput (j_common_ptr cinfo) {}
|
||||
|
||||
|
||||
// #ifdef NDEBUG
|
||||
// char errorMessage[JMSG_LENGTH_MAX];
|
||||
// #endif
|
||||
|
||||
static void OnError (j_common_ptr cinfo) {
|
||||
|
||||
ErrorData * err = (ErrorData *)cinfo->err;
|
||||
|
||||
// #ifdef NDEBUG
|
||||
// ( *(cinfo->err->format_message) ) (cinfo, errorMessage);
|
||||
// fprintf(stderr, "%s\n", errorMessage);
|
||||
// #endif
|
||||
|
||||
longjmp (err->on_error, 1);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user