From e7e1ec6e841c80cfc56fda58e7abeefc1f568658 Mon Sep 17 00:00:00 2001 From: Mickael Savinaud Date: Fri, 18 Nov 2011 08:42:57 +0000 Subject: [PATCH] [trunk] WIP: fix bug with windows platform and j2k_to_image --- CHANGES | 3 +++ applications/codec/j2k_to_image.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f63821b9..112bae1b 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +November 18, 2011 +* [mickael] WIP: fix bug with windows platform and j2k_to_image + November 17, 2011 * [mickael] WIP: fix bug when decoding an area or a tile with special resolution + [mickael] WIP: enhance j2k_to_image with new get_decoded_tile functionality diff --git a/applications/codec/j2k_to_image.c b/applications/codec/j2k_to_image.c index da39b25f..c893567f 100644 --- a/applications/codec/j2k_to_image.c +++ b/applications/codec/j2k_to_image.c @@ -269,6 +269,7 @@ static int infile_format(const char *fname) const char *s, *magic_s; int ext_format, magic_format; unsigned char buf[12]; + unsigned int l_nb_read; reader = fopen(fname, "rb"); @@ -276,7 +277,7 @@ static int infile_format(const char *fname) return -1; memset(buf, 0, 12); - unsigned int l_nb_read = fread(buf, 1, 12, reader); + l_nb_read = fread(buf, 1, 12, reader); fclose(reader); if (l_nb_read != 12) return -1; -- 2.40.0