summaryrefslogtreecommitdiff
path: root/jcmaster.c
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2013-09-24 03:39:51 +0000
committerDRC <dcommander@users.sourceforge.net>2013-09-24 03:39:51 +0000
commit5d2514b86f8e88177569ee398715e2512ef9967b (patch)
tree3a950604eb73e8e7f351f737ccd5e3064e55b24f /jcmaster.c
parentba923a852943792f5109e2c8c5a480ad9ec860db (diff)
We can't enable optimized entropy coding unless we're using Huffman coding. This fixes a bug whereby attempting to create a progressive JPEG with arithmetic coding would fail.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@1036 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jcmaster.c')
-rw-r--r--jcmaster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jcmaster.c b/jcmaster.c
index bee0caf..accfc70 100644
--- a/jcmaster.c
+++ b/jcmaster.c
@@ -602,7 +602,7 @@ jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only)
cinfo->num_scans = 1;
}
- if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */
+ if (cinfo->progressive_mode && !cinfo->arith_code) /* TEMPORARY HACK ??? */
cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */
/* Initialize my private state */