Originally committed to SVN as r116.

This commit is contained in:
Fredrik Mellbin 2006-02-22 19:55:33 +00:00
parent 3d73c9a533
commit 90e4ec6783
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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)