Fixed problem with duplicated SOI and SOF markers as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=581
This commit is contained in:
parent
82a4bcedb1
commit
80ca7917b4
@ -1,3 +1,5 @@
|
||||
/* $Id: tif_ojpeg.c,v 1.12 2004-05-27 10:04:49 dron Exp $ */
|
||||
|
||||
#include "tiffiop.h"
|
||||
#ifdef OJPEG_SUPPORT
|
||||
|
||||
@ -326,13 +328,20 @@ static const char JPEGLib_name[]={"JPEG Library"},
|
||||
*/
|
||||
static void
|
||||
TIFFojpeg_error_exit(register j_common_ptr cinfo)
|
||||
{ char buffer[JMSG_LENGTH_MAX];
|
||||
{
|
||||
char buffer[JMSG_LENGTH_MAX];
|
||||
int code = cinfo->err->msg_code;
|
||||
|
||||
if (((OJPEGState *)cinfo)->is_WANG) {
|
||||
if (code == JERR_SOF_DUPLICATE || code == JERR_SOI_DUPLICATE)
|
||||
return; /* ignore it */
|
||||
}
|
||||
|
||||
(*cinfo->err->format_message)(cinfo,buffer);
|
||||
TIFFError(JPEGLib_name,buffer); /* Display error message */
|
||||
jpeg_abort(cinfo); /* Clean up JPEG Library state */
|
||||
LONGJMP(((OJPEGState *)cinfo)->exit_jmpbuf,1); /* Return to TIFF client */
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
TIFFojpeg_output_message(register j_common_ptr cinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user