From 334a46cc5de5a0331bf376a02188d5dba50987fa Mon Sep 17 00:00:00 2001 From: eisneinechse <42617957+eisneinechse@users.noreply.github.com> Date: Fri, 1 Feb 2019 03:38:44 -0800 Subject: [PATCH] Fix check if GPU can be used for encoding and decoding --- src/FFmpegReader.cpp | 2 +- src/FFmpegWriter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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__)