diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 2e938f35..7439db4d 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -415,7 +415,7 @@ void FFmpegReader::Open() } // Check if it is there and writable #if defined(__linux__) - if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == -1 ) { + if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) { #elif defined(_WIN32) if( adapter_ptr != NULL ) { #elif defined(__APPLE__) diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 14171894..41285314 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1316,7 +1316,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) } // Check if it is there and writable #if defined(__linux__) - if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == -1 ) { + if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) { #elif defined(_WIN32) if( adapter_ptr != NULL ) { #elif defined(__APPLE__)