[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55247] trunk/blender/source/blender: Fix #34626: voxel data texture can't read > 2GB files on Windows.

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Mar 13 18:16:47 CET 2013


Revision: 55247
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55247
Author:   blendix
Date:     2013-03-13 17:16:47 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/avi/intern/avi.c
    trunk/blender/source/blender/blenlib/BLI_fileops.h

Modified: trunk/blender/source/blender/avi/intern/avi.c
===================================================================
--- trunk/blender/source/blender/avi/intern/avi.c	2013-03-13 15:41:14 UTC (rev 55246)
+++ trunk/blender/source/blender/avi/intern/avi.c	2013-03-13 17:16:47 UTC (rev 55247)
@@ -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 @@
 	FILE *fp;
 	int ret;
 	
-	fp = fopen(name, "rb");
+	fp = BLI_fopen(name, "rb");
 	if (fp == NULL)
 		return 0;
 
@@ -238,7 +236,7 @@
 	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 @@
 	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 @@
 	int64_t junk_pos;
 
 	movie->type = AVI_MOVIE_WRITE;
-	movie->fp = fopen(name, "wb");
+	movie->fp = BLI_fopen(name, "wb");
 
 	movie->index_entries = 0;
 

Modified: trunk/blender/source/blender/blenlib/BLI_fileops.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_fileops.h	2013-03-13 15:41:14 UTC (rev 55246)
+++ trunk/blender/source/blender/blenlib/BLI_fileops.h	2013-03-13 17:16:47 UTC (rev 55247)
@@ -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>
 




More information about the Bf-blender-cvs mailing list