From b51ee895d8266529af7f96cb24fba53df273d32e Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 31 Oct 2013 05:00:19 +0000 Subject: [PATCH] r1065 broke the build on Windows, because getinstance() defines a variable. Thus, it needs to occur before the array initialization code. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1069 632fc199-4ca6-4c93-a231-07263d6284db --- turbojpeg.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/turbojpeg.c b/turbojpeg.c index d4ee84a..ebfdf79 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -710,13 +710,14 @@ DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle, unsigned char *srcBuf, unsigned char *rgbBuf=NULL; #endif + getinstance(handle); + for(i=0; iinit&COMPRESS)==0) _throw("tjEncodeYUV3(): Instance has not been initialized for compression"); @@ -870,12 +871,13 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf, tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS]; JSAMPLE *_tmpbuf=NULL, *ptr=srcBuf; JSAMPROW *tmpbuf[MAX_COMPONENTS]; + getinstance(handle) + for(i=0; iinit&COMPRESS)==0) _throw("tjCompressFromYUV(): Instance has not been initialized for compression"); @@ -1232,12 +1234,13 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle, JSAMPLE *_tmpbuf=NULL, *ptr=dstBuf; JSAMPROW *tmpbuf[MAX_COMPONENTS]; int dctsize; + getinstance(handle); + for(i=0; iinit&DECOMPRESS)==0) _throw("tjDecompressToYUV2(): Instance has not been initialized for decompression"); -- 2.40.0