From 2479921c7115dba5b3d41a047a18402a77366bbd Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 7 Sep 2007 13:06:36 +0000 Subject: [PATCH] ENH: Upon failure, properly return error code (!=0) --- ChangeLog | 3 +++ codec/image_to_j2k.c | 2 +- codec/j2k_to_image.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5aa3efda..3bd5c2d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +September 7, 2007 +* [Mathieu Malaterre] Upon failure, properly return error code (!=0). + September 6, 2007 + [Mathieu Malaterre] CMake: start compiling mj2, jpwl and jp3d + [Mathieu Malaterre] CMake: output all executable/libs into one single directory diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index cbb9d0bc..14737424 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -1750,7 +1750,7 @@ int main(int argc, char **argv) { /* parse input and get user encoding parameters */ if(parse_cmdline_encoder(argc, argv, ¶meters,&img_fol, &raw_cp) == 1) { - return 0; + return 1; } if (parameters.cp_cinema){ diff --git a/codec/j2k_to_image.c b/codec/j2k_to_image.c index ee774166..677bf98e 100644 --- a/codec/j2k_to_image.c +++ b/codec/j2k_to_image.c @@ -522,7 +522,7 @@ int main(int argc, char **argv) { /* parse input and get user encoding parameters */ if(parse_cmdline_decoder(argc, argv, ¶meters,&img_fol) == 1) { - return 0; + return 1; } if(img_fol.set_imgdir==1){