jpeg_memsrcdest: extend feature check
PATCH 1/1 jpeg_memsrcdest: extend feature check
libjpeg.h in OpenEmbedded master (from libjpeg-turbo 1.5.0) provides these methods if "JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)".
The support for the jpeg_mem functions was added even when not emulating the libjpeg8 API, controlled via the MEM_SRCDST_SUPPORTED define, so checking for the version alone is not enough anymore.
See https://github.com/libjpeg-turbo/libjpeg-turbo/commit/ab70623eb29e09e67222be5b9e1ea320fe5aa0e9
This fixes errors about conflicting declarations (signed vs. unsigned char).
Signed-off-by Patrick Ohly <[email protected]>
--- lib/libv4lconvert/jpeg_memsrcdest.c | 4 ++-- lib/libv4lconvert/jpeg_memsrcdest.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
lib/libv4lconvert/jpeg_memsrcdest.c +2 -2
@@ -30,8 +30,8 @@#include "jpeg_memsrcdest.h" /* libjpeg8 and later come with their own (API compatible) memory source -and dest */ -#if JPEG_LIB_VERSION <80 +and dest, and older versions may have it backported */ +#if JPEG_LIB_VERSION <80 && !defined(MEM_SRCDST_SUPPORTED )/* Expanded data source object for memory input */
lib/libv4lconvert/jpeg_memsrcdest.h +1 -1
@@ -1,6 +1,6 @@#include <jpeglib.h> -#if JPEG_LIB_VERSION <80 +#if JPEG_LIB_VERSION <80 && !defined(MEM_SRCDST_SUPPORTED ) void jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
Signature · 1 line
2.1.4