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
path: root/source
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2007-05-30 10:11:25 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2007-05-30 10:11:25 +0400
commit86ff85932b14fe5005e383b43365319fd741b66e (patch)
treedbc1f63eac5aabd32ae230515e28378f6d42ef59 /source
parent7585adc8cce519773dd775d611f661ca22e7dc27 (diff)
* 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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/imbuf/intern/util.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index fccb3aba7fc..69390951a25 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -258,17 +258,17 @@ static int isffmpeg (char *filename) {
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 @@ int imb_get_anim_type(char * name) {
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);