diff --git a/core/avisynth.h b/core/avisynth.h index d64154f7c..b1e68deb4 100644 --- a/core/avisynth.h +++ b/core/avisynth.h @@ -39,7 +39,7 @@ #ifndef __AVISYNTH_H__ #define __AVISYNTH_H__ -enum { AVISYNTH_INTERFACE_VERSION = 2 }; +enum { AVISYNTH_INTERFACE_VERSION = 3 }; /* Define all types necessary for interfacing with avisynth.dll diff --git a/core/avisynth_wrap.cpp b/core/avisynth_wrap.cpp index e3f0b967c..e0b52e97c 100644 --- a/core/avisynth_wrap.cpp +++ b/core/avisynth_wrap.cpp @@ -60,16 +60,15 @@ AviSynthWrapper::AviSynthWrapper() { if (CreateScriptEnv == NULL) throw _T("Failed to get function from avisynth.dll"); - env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION); + // Require Avisynth 2.5.6+? + if (Options.AsBool(_T("Allow Ancient Avisynth"))) + env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION-1); + else + env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION); if (env == NULL) throw _T("Failed to create a new avisynth script environment. Avisynth is too old?"); - // Check for a new enough avisynth version by looking for the most obscure function used - // fix me, no longer useful with "Cache"? - if (!env->FunctionExists("Cache")) - throw _T("Installed version of avisynth is too old"); - // Set memory limit int memoryMax = Options.AsInt(_T("Avisynth MemoryMax")); if (memoryMax != 0)