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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2012-04-09 05:16:19 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2012-04-09 05:16:19 +0400
commitdabcdc15325702586501b5a6e401876f776d3c4c (patch)
tree7ecbd10dbe5b3ef905dcb5e4fd632a451605add8 /source/blender/avi
parent35b483671188ca4bd418c3206809379aff179082 (diff)
Warning Fixes - const correctness in unicode encoding, unused variables in blenlib, and some type conversions
This is from a patch that is in the tracker, but it leaves out a fix of BLI_gzopen which needs more work.
Diffstat (limited to 'source/blender/avi')
-rw-r--r--source/blender/avi/intern/avi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index dff22867d81..0658317a0bd 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -741,6 +741,7 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
int i;
int64_t header_pos1, header_pos2;
int64_t stream_pos1, stream_pos2;
+ int64_t junk_pos;
movie->type = AVI_MOVIE_WRITE;
movie->fp = fopen (name, "wb");
@@ -899,9 +900,11 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...)
fseek (movie->fp, stream_pos2, SEEK_SET);
}
- if (ftell(movie->fp) < 2024 - 8) {
+ junk_pos= ftell(movie->fp);
+
+ if (junk_pos < 2024 - 8) {
chunk.fcc = FCC("JUNK");
- chunk.size = 2024-8-ftell(movie->fp);
+ chunk.size = 2024 - 8 - (int)junk_pos;
awrite (movie, &chunk, 1, sizeof(AviChunk), movie->fp, AVI_CHUNK);