Fix an issue that resulted in an error ("Invalid SOS parameters for sequential JPEG. Didn't expect more than one scan.") when decoding progressive+arithmetic JPEGs generated by libjpeg-turbo.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1081 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* This file was part of the Independent JPEG Group's software:
|
* This file was part of the Independent JPEG Group's software:
|
||||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||||
|
* Modified 2003-2010 by Guido Vollbeding.
|
||||||
* Modifications:
|
* Modifications:
|
||||||
* Copyright (C) 2010, D. R. Commander.
|
* Copyright (C) 2010, D. R. Commander.
|
||||||
* For conditions of distribution and use, see the accompanying README file.
|
* For conditions of distribution and use, see the accompanying README file.
|
||||||
@@ -532,7 +533,10 @@ write_frame_header (j_compress_ptr cinfo)
|
|||||||
|
|
||||||
/* Emit the proper SOF marker */
|
/* Emit the proper SOF marker */
|
||||||
if (cinfo->arith_code) {
|
if (cinfo->arith_code) {
|
||||||
emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */
|
if (cinfo->progressive_mode)
|
||||||
|
emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */
|
||||||
|
else
|
||||||
|
emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */
|
||||||
} else {
|
} else {
|
||||||
if (cinfo->progressive_mode)
|
if (cinfo->progressive_mode)
|
||||||
emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
|
emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */
|
||||||
|
|||||||
Reference in New Issue
Block a user