Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-05-28 20:50:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-05-28 21:21:39 +0400
commit973f95fa9dfb21e4347a510f119c55b9673f6076 (patch)
tree9c08ca5e2803b3b816f4e443938a80ea9319df20 /source/blender/imbuf
parent74cc3974fea0422343b09bdd61e4d3924c62940a (diff)
Fix T40157: Loading movies larger than 4GB in size fails
Issue was caused by _wstat returning EOVERFLOW error because of file size didn't fit into stat structure which was using long datatype. The idea of this patch is to use _wstat64 and _stat64 structure which is capable storing 64bit file sizes. Made it a typedef for stat structure used by BLI_stat function in order to make code easier to follow and avoid ifdefs all over the place. Additionally solved issue with BLI_exists which was wrongly returning False in cases destination file is larger then 4GB.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/thumbs.c4
-rw-r--r--source/blender/imbuf/intern/util.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index b4c97a2aea1..236d41078d6 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -305,7 +305,7 @@ ImBuf *IMB_thumb_create(const char *path, ThumbSize size, ThumbSource source, Im
short tsize = 128;
short ex, ey;
float scaledx, scaledy;
- struct stat info;
+ BLI_stat_t info;
switch (size) {
case THB_NORMAL:
@@ -472,7 +472,7 @@ ImBuf *IMB_thumb_manage(const char *path, ThumbSize size, ThumbSource source)
{
char thumb[FILE_MAX];
char uri[URI_MAX];
- struct stat st;
+ BLI_stat_t st;
ImBuf *img = NULL;
if (BLI_stat(path, &st)) {
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index fbb28849ce6..b912c3e229a 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -187,7 +187,7 @@ int IMB_ispic_type(const char *name)
unsigned char buf[HEADER_SIZE];
ImFileType *type;
- struct stat st;
+ BLI_stat_t st;
int fp;
if (UTIL_DEBUG) printf("IMB_ispic_name: loading %s\n", name);
@@ -391,7 +391,7 @@ static int isredcode(const char *filename)
int imb_get_anim_type(const char *name)
{
int type;
- struct stat st;
+ BLI_stat_t st;
if (UTIL_DEBUG) printf("in getanimtype: %s\n", name);