Oops. Height of output buffer should equal scaled height, not JPEG height.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@755 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C)2009-2011 D. R. Commander. All Rights Reserved.
|
* Copyright (C)2009-2012 D. R. Commander. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@@ -110,7 +110,7 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
|
|||||||
if((handle=tjInitDecompress())==NULL)
|
if((handle=tjInitDecompress())==NULL)
|
||||||
_throwtj("executing tjInitDecompress()");
|
_throwtj("executing tjInitDecompress()");
|
||||||
|
|
||||||
bufsize=(yuv==YUVDECODE? yuvsize:pitch*h);
|
bufsize=(yuv==YUVDECODE? yuvsize:pitch*scaledh);
|
||||||
if(dstbuf==NULL)
|
if(dstbuf==NULL)
|
||||||
{
|
{
|
||||||
if((dstbuf=(unsigned char *)malloc(bufsize)) == NULL)
|
if((dstbuf=(unsigned char *)malloc(bufsize)) == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user