Fix check if GPU can be used for encoding and decoding

This commit is contained in:
eisneinechse
2019-02-01 03:38:44 -08:00
parent 2e635e3d87
commit 334a46cc5d
2 changed files with 2 additions and 2 deletions

View File

@@ -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__)

View File

@@ -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__)