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:
authorPeter Schlaile <peter@schlaile.de>2009-06-21 21:00:18 +0400
committerPeter Schlaile <peter@schlaile.de>2009-06-21 21:00:18 +0400
commit29c6440bb39e20b6e0650be22c0d459fa434a608 (patch)
treeee09df3f3070f7173ff1b1905c488d74f0e134bd /source/blender/avi
parent4dec9f3cb620098aba742c43b69031eb6b3f4591 (diff)
== AVI ==
Only open AVI files with at least one supported video track type. (This is the real fix for DV-Type1-AVIs, since the FCC of iads, that is used there, wasn't detected. But the code will happily open AVI-files with only audio tracks... So the real fix is: only try to open things, that contains something we know how to handle :) )
Diffstat (limited to 'source/blender/avi')
-rw-r--r--source/blender/avi/intern/avi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c
index 386597c6d85..005c05dec1d 100644
--- a/source/blender/avi/intern/avi.c
+++ b/source/blender/avi/intern/avi.c
@@ -214,6 +214,7 @@ int AVI_is_avi (char *name) {
AviMovie movie;
AviMainHeader header;
AviBitmapInfoHeader bheader;
+ int movie_tracks = 0;
DEBUG("opening movie\n");
@@ -303,6 +304,7 @@ int AVI_is_avi (char *name) {
fclose(movie.fp);
return 0;
}
+ movie_tracks++;
}
movie.streams[temp].sh.Flags = GET_FCC (movie.fp);
@@ -394,7 +396,10 @@ int AVI_is_avi (char *name) {
MEM_freeN(movie.streams);
fclose(movie.fp);
- return 1;
+
+ /* at least one video track is needed */
+ return (movie_tracks != 0);
+
}
AviError AVI_open_movie (char *name, AviMovie *movie) {