From a38b97fae0c9f66ff5c7f152d9ce88f6ee73a5b4 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 1 Jul 2014 13:51:55 +0000 Subject: [PATCH] [trunk] moved comment marker setup from opj_compress to the library --- src/bin/jp2/opj_compress.c | 16 ---------------- src/lib/openjp2/j2k.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c index f0ff3e4d..f2b3f2fb 100644 --- a/src/bin/jp2/opj_compress.c +++ b/src/bin/jp2/opj_compress.c @@ -1572,22 +1572,6 @@ int main(int argc, char **argv) { return 1; } - /* Create comment for codestream */ - if(parameters.cp_comment == NULL) { - const char comment[] = "Created by OpenJPEG version "; - const size_t clen = strlen(comment); - const char *version = opj_version(); - /* UniPG>> */ -#ifdef USE_JPWL - parameters.cp_comment = (char*)malloc(clen+strlen(version)+11); - sprintf(parameters.cp_comment,"%s%s with JPWL", comment, version); -#else - parameters.cp_comment = (char*)malloc(clen+strlen(version)+1); - sprintf(parameters.cp_comment,"%s%s", comment, version); -#endif - /* <tw = 1; cp->th = 1; + /* Create comment for codestream */ + if(parameters->cp_comment == NULL) { + const char comment[] = "Created by OpenJPEG version "; + const size_t clen = strlen(comment); + const char *version = opj_version(); + /* UniPG>> */ +#ifdef USE_JPWL + parameters->cp_comment = (char*)malloc(clen+strlen(version)+11); + sprintf(parameters->cp_comment,"%s%s with JPWL", comment, version); +#else + parameters->cp_comment = (char*)malloc(clen+strlen(version)+1); + sprintf(parameters->cp_comment,"%s%s", comment, version); +#endif + /* <rsiz == OPJ_PROFILE_NONE) { /* consider deprecated fields only if RSIZ has not been set */ OPJ_BOOL deprecated_used = OPJ_FALSE;