Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LWKS-Software/libheif into LWKS-S…
Browse files Browse the repository at this point in the history
…oftware-master
  • Loading branch information
farindk committed Dec 19, 2023
2 parents 2591939 + b42a564 commit b774bb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions extra/getopt_long.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ __progname(char * nargv0)
* Parse argc/argv argument vector.
*/
int
getopt_internal(int nargc, char ** nargv, const char *ostr)
getopt_internal(int nargc, char * const* nargv, const char *ostr)
{
static char *place = EMSG; /* option letter processing */
const char *oli; /* option letter list index */
Expand Down Expand Up @@ -142,7 +142,7 @@ getopt2(int nargc, char * nargv, const char *ostr)

if ((retval = getopt_internal(nargc, nargv, ostr)) == -2) {
retval = -1;
++optind;
++optind;
}
return(retval);
}
Expand Down Expand Up @@ -175,11 +175,11 @@ getopt_long(int nargc, char ** nargv, char * options, struct option * long_optio
} else
current_argv_len = strlen(current_argv);

for (i = 0; long_options[i].name; i++) {
for (i = 0; long_options[i].name; i++) {
if (strncmp(current_argv, long_options[i].name, current_argv_len))
continue;

if (strlen(long_options[i].name) == (unsigned)current_argv_len) {
if (strlen(long_options[i].name) == (unsigned)current_argv_len) {
match = i;
break;
}
Expand Down Expand Up @@ -215,7 +215,7 @@ getopt_long(int nargc, char ** nargv, char * options, struct option * long_optio
if (long_options[match].flag) {
*long_options[match].flag = long_options[match].val;
retval = 0;
} else
} else
retval = long_options[match].val;
if (index)
*index = match;
Expand Down
8 changes: 4 additions & 4 deletions libheif/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,7 @@ static bool nclx_profile_matches_spec(heif_colorspace colorspace,
image_nclx = std::make_shared<color_profile_nclx>();
}

if (image_nclx->get_full_range_flag() != spec_nclx->full_range_flag) {
if (image_nclx->get_full_range_flag() != ( spec_nclx->full_range_flag == 0 ? false : true ) ) {
return false;
}

Expand Down Expand Up @@ -2938,9 +2938,9 @@ Error HeifContext::encode_image_as_jpeg2000(const std::shared_ptr<HeifPixelImage
for (;;) {
uint8_t* data;
int size;

encoder->plugin->get_compressed_data(encoder->encoder, &data, &size, nullptr);

if (data == NULL) {
break;
}
Expand All @@ -2954,7 +2954,7 @@ Error HeifContext::encode_image_as_jpeg2000(const std::shared_ptr<HeifPixelImage



//Add 'ispe' Property
//Add 'ispe' Property
m_heif_file->add_ispe_property(image_id, image->get_width(), image->get_height());

//Add 'colr' Property
Expand Down

0 comments on commit b774bb3

Please sign in to comment.