Revision: 21062
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21062
Author:   schlaile
Date:     2009-06-21 19:00:18 +0200 (Sun, 21 Jun 2009)

Log Message:
-----------
== 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 :) )

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

Modified: trunk/blender/source/blender/avi/intern/avi.c
===================================================================
--- trunk/blender/source/blender/avi/intern/avi.c       2009-06-21 16:58:22 UTC 
(rev 21061)
+++ trunk/blender/source/blender/avi/intern/avi.c       2009-06-21 17:00:18 UTC 
(rev 21062)
@@ -214,6 +214,7 @@
        AviMovie movie;
        AviMainHeader header;
        AviBitmapInfoHeader bheader;
+       int movie_tracks = 0;
        
        DEBUG("opening movie\n");
 
@@ -303,6 +304,7 @@
                                fclose(movie.fp);
                                return 0;
                        }
+                       movie_tracks++;
                }
                
                movie.streams[temp].sh.Flags = GET_FCC (movie.fp);
@@ -394,7 +396,10 @@
        
        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) {


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to