diff --git a/src/audio_provider_vs.cpp b/src/audio_provider_vs.cpp index e66779502..575daaad6 100644 --- a/src/audio_provider_vs.cpp +++ b/src/audio_provider_vs.cpp @@ -54,7 +54,6 @@ public: }; VapoursynthAudioProvider::VapoursynthAudioProvider(agi::fs::path const& filename) try { - agi::acs::CheckFileRead(filename); std::lock_guard lock(vs.GetMutex()); script = vs.GetScriptAPI()->createScript(nullptr); @@ -162,6 +161,7 @@ VapoursynthAudioProvider::~VapoursynthAudioProvider() { } std::unique_ptr CreateVapoursynthAudioProvider(agi::fs::path const& file, agi::BackgroundRunner *) { + agi::acs::CheckFileRead(file); return agi::make_unique(file); } #endif diff --git a/src/video_provider_vs.cpp b/src/video_provider_vs.cpp index fa5dfdbf1..a0a006f43 100644 --- a/src/video_provider_vs.cpp +++ b/src/video_provider_vs.cpp @@ -105,7 +105,6 @@ void VapoursynthVideoProvider::SetResizeArg(VSMap *args, const VSMap *props, con } VapoursynthVideoProvider::VapoursynthVideoProvider(agi::fs::path const& filename, std::string const& colormatrix) try { - agi::acs::CheckFileRead(filename); std::lock_guard lock(vs.GetMutex()); script = vs.GetScriptAPI()->createScript(nullptr); @@ -277,6 +276,7 @@ VapoursynthVideoProvider::~VapoursynthVideoProvider() { namespace agi { class BackgroundRunner; } std::unique_ptr CreateVapoursynthVideoProvider(agi::fs::path const& path, std::string const& colormatrix, agi::BackgroundRunner *) { + agi::acs::CheckFileRead(path); return agi::make_unique(path, colormatrix); } #endif // WITH_VAPOURSYNTH