]> granicus.if.org Git - openjpeg/commitdiff
[trunk] backout wrong changeset 1091 - see issue 123
authorJulien Malik <julien.malik@paraiso.me>
Sun, 27 Nov 2011 20:28:24 +0000 (20:28 +0000)
committerJulien Malik <julien.malik@paraiso.me>
Sun, 27 Nov 2011 20:28:24 +0000 (20:28 +0000)
CHANGES
libopenjpeg/openjpeg.c
libopenjpeg/opj_includes.h

diff --git a/CHANGES b/CHANGES
index 53c27636de9cae3b2d8be44e5aded2e255bea651..74ac2825f4a9a3be495b60fd80fb059eaa3c707c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+November 27, 2011
+* [jmalik] reverted changeset 1091 (see issue #103)
+
 November 24, 2011
 * [jmalik] support seeking in files larger than 2 GB
 
index f1efde1fd34aaa9c0813742e0062c56b50b4e34c..73b136d6fe4675ad15d34f113ccc1441cac425e3 100644 (file)
@@ -165,25 +165,7 @@ OPJ_SIZE_T opj_skip_from_file (OPJ_SIZE_T p_nb_bytes, FILE * p_user_data)
 
 opj_bool opj_seek_from_file (OPJ_SIZE_T p_nb_bytes, FILE * p_user_data)
 {
-  /*
-   * p_nb_bytes is 'OPJ_SIZE_T' but fseek takes a 'signed long'
-   * 
-   * As such, fseek can seek to a maximum of 2^31-1 bytes (2 GB)
-   * To support seeking in files between 2 GB and 4 GB :
-   * - first, do a seek with the max supported by fseek
-   * - secondly, seek of the remaining bytes
-   */
-  if (p_nb_bytes > LONG_MAX) {
-    if (fseek(p_user_data,LONG_MAX,SEEK_SET)) {
-      return EXIT_FAILURE;
-    }
-    p_nb_bytes -= LONG_MAX;
-
-    if (fseek(p_user_data,p_nb_bytes,SEEK_CUR)) {
-      return EXIT_FAILURE;
-    }
-  }
-  else if (fseek(p_user_data,p_nb_bytes,SEEK_SET)) {
+       if (fseek(p_user_data,p_nb_bytes,SEEK_SET)) {
                return EXIT_FAILURE;
        }
 
index 8aefbafe27581d09d32fe20b54d4726d691b1ba6..d94237e7fbff290e120ab12337e81bc10a4451a6 100644 (file)
@@ -41,7 +41,6 @@
 #include <stdarg.h>
 #include <ctype.h>
 #include <assert.h>
-#include <limits.h>
 
 /*
  ==========================================================