diff --git a/src/audio_provider_avs.cpp b/src/audio_provider_avs.cpp index 0daa77e8e..fff0ed823 100644 --- a/src/audio_provider_avs.cpp +++ b/src/audio_provider_avs.cpp @@ -64,8 +64,6 @@ public: }; AvisynthAudioProvider::AvisynthAudioProvider(agi::fs::path const& filename) try { - agi::acs::CheckFileRead(filename); - std::lock_guard lock(avs_wrapper.GetMutex()); try { @@ -150,6 +148,7 @@ void AvisynthAudioProvider::FillBuffer(void *buf, int64_t start, int64_t count) } std::unique_ptr CreateAvisynthAudioProvider(agi::fs::path const& file, agi::BackgroundRunner *) { + agi::acs::CheckFileRead(file); return agi::make_unique(file); } #endif diff --git a/src/video_provider_avs.cpp b/src/video_provider_avs.cpp index 7c779e800..263310675 100644 --- a/src/video_provider_avs.cpp +++ b/src/video_provider_avs.cpp @@ -94,8 +94,6 @@ public: }; AvisynthVideoProvider::AvisynthVideoProvider(agi::fs::path const& filename, std::string const& colormatrix) try { - agi::acs::CheckFileRead(filename); - std::lock_guard lock(avs.GetMutex()); #ifdef _WIN32 @@ -326,6 +324,7 @@ void AvisynthVideoProvider::GetFrame(int n, VideoFrame &out) { namespace agi { class BackgroundRunner; } std::unique_ptr CreateAvisynthVideoProvider(agi::fs::path const& path, std::string const& colormatrix, agi::BackgroundRunner *) { + agi::acs::CheckFileRead(path); return agi::make_unique(path, colormatrix); } #endif // HAVE_AVISYNTH