From 05d24e826d30bc11f17464dbfb5045a56337b05c Mon Sep 17 00:00:00 2001 From: DRC Date: Mon, 10 Mar 2014 21:38:11 +0000 Subject: [PATCH] Fix Windows build git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1147 632fc199-4ca6-4c93-a231-07263d6284db --- turbojpeg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/turbojpeg.c b/turbojpeg.c index ea710c9..9117273 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -685,13 +685,14 @@ DLLEXPORT int DLLCALL tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, unsigned char *rgbBuf=NULL; #endif + getinstance(handle); + for(i=0; iinit&COMPRESS)==0) _throw("tjEncodeYUV2(): Instance has not been initialized for compression"); @@ -1057,12 +1058,13 @@ DLLEXPORT int DLLCALL tjDecompressToYUV(tjhandle handle, tmpbufsize=0, usetmpbuf=0, th[MAX_COMPONENTS]; JSAMPLE *_tmpbuf=NULL, *ptr=dstBuf; JSAMPROW *tmpbuf[MAX_COMPONENTS]; + getinstance(handle); + for(i=0; iinit&DECOMPRESS)==0) _throw("tjDecompressToYUV(): Instance has not been initialized for decompression"); -- 2.40.0