Fix #27877: writing .avi files > 4 GB not working on windows.
Solution is to replace "long" by "int64_t" and "fseek" by "_fseeki64", because long on 64 bit windows is still 32 bit.
This commit is contained in:
@@ -327,7 +327,7 @@ static PyObject* gPyLoadGlobalDict(PyObject*)
|
||||
{
|
||||
char marshal_path[512];
|
||||
char *marshal_buffer = NULL;
|
||||
unsigned int marshal_length;
|
||||
size_t marshal_length;
|
||||
FILE *fp = NULL;
|
||||
int result;
|
||||
|
||||
@@ -338,7 +338,7 @@ static PyObject* gPyLoadGlobalDict(PyObject*)
|
||||
if (fp) {
|
||||
// obtain file size:
|
||||
fseek (fp, 0, SEEK_END);
|
||||
marshal_length = ftell(fp);
|
||||
marshal_length = (size_t)ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
marshal_buffer = (char*)malloc (sizeof(char)*marshal_length);
|
||||
|
||||
Reference in New Issue
Block a user