forked from mia/Aegisub
Originally committed to SVN as r116.
This commit is contained in:
parent
3d73c9a533
commit
90e4ec6783
2 changed files with 6 additions and 7 deletions
|
@ -39,7 +39,7 @@
|
||||||
#ifndef __AVISYNTH_H__
|
#ifndef __AVISYNTH_H__
|
||||||
#define __AVISYNTH_H__
|
#define __AVISYNTH_H__
|
||||||
|
|
||||||
enum { AVISYNTH_INTERFACE_VERSION = 2 };
|
enum { AVISYNTH_INTERFACE_VERSION = 3 };
|
||||||
|
|
||||||
|
|
||||||
/* Define all types necessary for interfacing with avisynth.dll
|
/* Define all types necessary for interfacing with avisynth.dll
|
||||||
|
|
|
@ -60,16 +60,15 @@ AviSynthWrapper::AviSynthWrapper() {
|
||||||
if (CreateScriptEnv == NULL)
|
if (CreateScriptEnv == NULL)
|
||||||
throw _T("Failed to get function from avisynth.dll");
|
throw _T("Failed to get function from avisynth.dll");
|
||||||
|
|
||||||
|
// Require Avisynth 2.5.6+?
|
||||||
|
if (Options.AsBool(_T("Allow Ancient Avisynth")))
|
||||||
|
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION-1);
|
||||||
|
else
|
||||||
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION);
|
env = CreateScriptEnv(AVISYNTH_INTERFACE_VERSION);
|
||||||
|
|
||||||
if (env == NULL)
|
if (env == NULL)
|
||||||
throw _T("Failed to create a new avisynth script environment. Avisynth is too old?");
|
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
|
// Set memory limit
|
||||||
int memoryMax = Options.AsInt(_T("Avisynth MemoryMax"));
|
int memoryMax = Options.AsInt(_T("Avisynth MemoryMax"));
|
||||||
if (memoryMax != 0)
|
if (memoryMax != 0)
|
||||||
|
|
Loading…
Reference in a new issue