[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10816] trunk/blender/source/blender/imbuf /intern/util.c: * Fix for #6707
Nathan Letwory
jesterking at letwory.net
Wed May 30 08:11:53 CEST 2007
Revision: 10816
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10816
Author: jesterking
Date: 2007-05-30 08:11:25 +0200 (Wed, 30 May 2007)
Log Message:
-----------
* Fix for #6707
This fix is windows specific. AVIs are now evaluated by the pre-FFMPEG code first, failing that only by FFMPEG. Adding the 200 frame testfile from the bugreport http://projects.blender.org/tracker/?func=detail&aid=6707&group_id=9&atid=125 now goes fine with Add>Movie. Add>Movie+Audio will complain about the fail first, but it will be added anyway.
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/util.c
Modified: trunk/blender/source/blender/imbuf/intern/util.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/util.c 2007-05-29 21:39:29 UTC (rev 10815)
+++ trunk/blender/source/blender/imbuf/intern/util.c 2007-05-30 06:11:25 UTC (rev 10816)
@@ -258,17 +258,17 @@
BLI_testextensie(filename, ".wav")) return 0;
if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0) {
- fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
+ if(UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
return 0;
}
if(av_find_stream_info(pFormatCtx)<0) {
- fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
+ if(UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
av_close_input_file(pFormatCtx);
return 0;
}
- dump_format(pFormatCtx, 0, filename, 0);
+ if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0);
/* Find the first video stream */
@@ -315,19 +315,33 @@
if(UTIL_DEBUG) printf("in getanimtype: %s\n", name);
-#ifdef WITH_FFMPEG
+#ifndef _WIN32
+# ifdef WITH_FFMPEG
/* stat test below fails on large files > 4GB */
if (isffmpeg(name)) return (ANIM_FFMPEG);
-#endif
+# endif
+ if (ib_stat(name,&st) == -1) return(0);
+ if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
+ if (isavi(name)) return (ANIM_AVI);
+
+ if (ismovie(name)) return (ANIM_MOVIE);
+# ifdef WITH_QUICKTIME
+ if (isqtime(name)) return (ANIM_QTIME);
+# endif
+#else
if (ib_stat(name,&st) == -1) return(0);
if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
if (isavi(name)) return (ANIM_AVI);
if (ismovie(name)) return (ANIM_MOVIE);
-#ifdef WITH_QUICKTIME
+# ifdef WITH_QUICKTIME
if (isqtime(name)) return (ANIM_QTIME);
+# endif
+# ifdef WITH_FFMPEG
+ if (isffmpeg(name)) return (ANIM_FFMPEG);
+# endif
#endif
type = IMB_ispic(name);
if (type == ANIM) return (ANIM_ANIM5);
More information about the Bf-blender-cvs
mailing list