+2014-01-05 Carl Hetherington <cth@carlh.net>
+
+ * Use _fseeki64 on Windows when reading content files.
+
2014-01-03 Carl Hetherington <cth@carlh.net>
* Version 1.56 released.
return fopen (p.c_str(), t.c_str ());
#endif
}
+
+int
+dcpomatic_fseek (FILE* stream, int64_t offset, int whence)
+{
+#ifdef DCPOMATIC_WINDOWS
+ return _fseeki64 (stream, offset, whence);
+#else
+ return fseek (stream, offset, whence);
+#endif
+}
extern boost::filesystem::path app_contents ();
#endif
extern FILE * fopen_boost (boost::filesystem::path, std::string);
+extern int dcpomatic_fseek (FILE *, int64_t, int);
}
ensure_open_path (i);
- fseek (_current_file, sub_pos, SEEK_SET);
+ dcpomatic_fseek (_current_file, sub_pos, SEEK_SET);
return full_pos;
}
}
/* Read the data from the MXF and hash it */
-#ifdef DCPOMATIC_WINDOWS
- _fseeki64 (mxf, info.offset, SEEK_SET);
-#else
- fseek (mxf, info.offset, SEEK_SET);
-#endif
+ dcpomatic_fseek (mxf, info.offset, SEEK_SET);
EncodedData data (info.size);
size_t const read = fread (data.data(), 1, data.size(), mxf);
if (read != static_cast<size_t> (data.size ())) {