From 29c6440bb39e20b6e0650be22c0d459fa434a608 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 21 Jun 2009 17:00:18 +0000 Subject: == 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 :) ) --- source/blender/avi/intern/avi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/avi') 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) { -- cgit v1.2.3