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:
2011-07-06 10:19:04 +00:00
parent 29f2cbdd8f
commit 11645e7a3f
8 changed files with 29 additions and 14 deletions

View File

@@ -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);