mirror of https://github.com/odrling/Aegisub
vapoursynth: Only set loaded when fully initialized
This commit is contained in:
parent
3b02a199f0
commit
0d0ed49546
|
@ -56,7 +56,6 @@ typedef VSSCRIPTAPI* VS_CC FUNC(int);
|
||||||
VapourSynthWrapper::VapourSynthWrapper() {
|
VapourSynthWrapper::VapourSynthWrapper() {
|
||||||
// VSScript assumes it's only loaded once, so unlike AVS we can't unload it when the refcount reaches zero
|
// VSScript assumes it's only loaded once, so unlike AVS we can't unload it when the refcount reaches zero
|
||||||
if (!vs_loaded) {
|
if (!vs_loaded) {
|
||||||
vs_loaded = true;
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define CONCATENATE(x, y) x ## y
|
#define CONCATENATE(x, y) x ## y
|
||||||
#define _Lstr(x) CONCATENATE(L, x)
|
#define _Lstr(x) CONCATENATE(L, x)
|
||||||
|
@ -92,6 +91,8 @@ VapourSynthWrapper::VapourSynthWrapper() {
|
||||||
|
|
||||||
if (!api)
|
if (!api)
|
||||||
throw VapoursynthError("Failed to get Vapoursynth API");
|
throw VapoursynthError("Failed to get Vapoursynth API");
|
||||||
|
|
||||||
|
vs_loaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue