Revert "avisynth: Only increase refcount when fully initialized"

This reverts commit f5a730fa45.
This commit is contained in:
arch1t3cht 2023-10-15 22:58:23 +02:00
parent 6704a8e57d
commit a9eed184c2
1 changed files with 1 additions and 3 deletions

View File

@ -67,7 +67,7 @@ const AVS_Linkage *AVS_linkage = nullptr;
typedef IScriptEnvironment* __stdcall FUNC(int);
AviSynthWrapper::AviSynthWrapper() {
if (!avs_refcount){
if (!avs_refcount++) {
#ifdef _WIN32
#define CONCATENATE(x, y) x ## y
#define _Lstr(x) CONCATENATE(L, x)
@ -94,8 +94,6 @@ AviSynthWrapper::AviSynthWrapper() {
if (!env)
throw AvisynthError("Failed to create a new avisynth script environment. Avisynth is too old?");
avs_refcount++;
AVS_linkage = env->GetAVSLinkage();
// Set memory limit