Skip to content

Commit

Permalink
Revert "avisynth: Only increase refcount when fully initialized"
Browse files Browse the repository at this point in the history
This reverts commit f5a730f.
  • Loading branch information
arch1t3cht committed Oct 15, 2023
1 parent 6704a8e commit a9eed18
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/avisynth_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit a9eed18

Please sign in to comment.