TurboJPEG: Don't make STOPONWARNING persistent
Due to an oversight in d4092f6b4d,
the state of TJFLAG_STOPONWARNING persisted beyond the function it
was passed to.
This commit is contained in:
@@ -864,6 +864,7 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, const unsigned char *srcBuf,
|
|||||||
#endif
|
#endif
|
||||||
if(row_pointer) free(row_pointer);
|
if(row_pointer) free(row_pointer);
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1057,6 +1058,7 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle,
|
|||||||
if(outbuf[i]!=NULL) free(outbuf[i]);
|
if(outbuf[i]!=NULL) free(outbuf[i]);
|
||||||
}
|
}
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1252,6 +1254,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
|
|||||||
}
|
}
|
||||||
if(_tmpbuf) free(_tmpbuf);
|
if(_tmpbuf) free(_tmpbuf);
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1525,6 +1528,7 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle,
|
|||||||
#endif
|
#endif
|
||||||
if(row_pointer) free(row_pointer);
|
if(row_pointer) free(row_pointer);
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1761,6 +1765,7 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
|
|||||||
if(inbuf[i]!=NULL) free(inbuf[i]);
|
if(inbuf[i]!=NULL) free(inbuf[i]);
|
||||||
}
|
}
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1981,6 +1986,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
|
|||||||
}
|
}
|
||||||
if(_tmpbuf) free(_tmpbuf);
|
if(_tmpbuf) free(_tmpbuf);
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2048,6 +2054,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
|
|||||||
strides, height, flags);
|
strides, height, flags);
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2236,5 +2243,6 @@ DLLEXPORT int DLLCALL tjTransform(tjhandle handle,
|
|||||||
if(dinfo->global_state>DSTATE_START) jpeg_abort_decompress(dinfo);
|
if(dinfo->global_state>DSTATE_START) jpeg_abort_decompress(dinfo);
|
||||||
if(xinfo) free(xinfo);
|
if(xinfo) free(xinfo);
|
||||||
if(this->jerr.warning) retval=-1;
|
if(this->jerr.warning) retval=-1;
|
||||||
|
this->jerr.stopOnWarning=FALSE;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user