forked from bartvdbraak/blender
Fix #34626: voxel data texture can't read > 2GB files on Windows.
Also fixed BLI_fopen not being used for AVI movie files, which meant AVI read could fail reading a file from a path with special characters on Windows.
This commit is contained in:
parent
80de3192a7
commit
a3ad35cf3a
@ -41,9 +41,7 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "MEM_sys_types.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# include "BLI_winstuff.h"
|
||||
#endif
|
||||
#include "BLI_fileops.h"
|
||||
|
||||
#include "AVI_avi.h"
|
||||
#include "avi_intern.h"
|
||||
@ -208,7 +206,7 @@ int AVI_is_avi(char *name)
|
||||
FILE *fp;
|
||||
int ret;
|
||||
|
||||
fp = fopen(name, "rb");
|
||||
fp = BLI_fopen(name, "rb");
|
||||
if (fp == NULL)
|
||||
return 0;
|
||||
|
||||
@ -238,7 +236,7 @@ int AVI_is_avi(const char *name)
|
||||
DEBUG_PRINT("opening movie\n");
|
||||
|
||||
movie.type = AVI_MOVIE_READ;
|
||||
movie.fp = fopen(name, "rb");
|
||||
movie.fp = BLI_fopen(name, "rb");
|
||||
movie.offset_table = NULL;
|
||||
|
||||
if (movie.fp == NULL)
|
||||
@ -441,7 +439,7 @@ AviError AVI_open_movie(const char *name, AviMovie *movie)
|
||||
memset(movie, 0, sizeof(AviMovie));
|
||||
|
||||
movie->type = AVI_MOVIE_READ;
|
||||
movie->fp = fopen(name, "rb");
|
||||
movie->fp = BLI_fopen(name, "rb");
|
||||
movie->offset_table = NULL;
|
||||
|
||||
if (movie->fp == NULL)
|
||||
@ -765,7 +763,7 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
|
||||
int64_t junk_pos;
|
||||
|
||||
movie->type = AVI_MOVIE_WRITE;
|
||||
movie->fp = fopen(name, "wb");
|
||||
movie->fp = BLI_fopen(name, "wb");
|
||||
|
||||
movie->index_entries = 0;
|
||||
|
||||
|
@ -33,6 +33,14 @@
|
||||
#ifndef __BLI_FILEOPS_H__
|
||||
#define __BLI_FILEOPS_H__
|
||||
|
||||
/* for 64 bit fseek, ftell, .. */
|
||||
#ifdef WIN32
|
||||
#include "BLI_winstuff.h"
|
||||
#endif
|
||||
|
||||
/* for bool */
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user