lavfi/tests/filtfmts: fix the build warning.
[ffmpeg.git] / libavfilter / vf_srcnn.c
index d9b4891..edffebb 100644 (file)
@@ -28,7 +28,6 @@
 #include "formats.h"
 #include "internal.h"
 #include "libavutil/opt.h"
-#include "unistd.h"
 #include "vf_srcnn.h"
 #include "libavformat/avio.h"
 
@@ -143,7 +142,7 @@ static av_cold int init(AVFilterContext* context)
         srcnn_context->conv3.size = 5;
         CHECK_ALLOCATION(allocate_copy_conv_data(&srcnn_context->conv3, conv3_kernel, conv3_biases), )
     }
-    else if (access(srcnn_context->config_file_path, R_OK) != -1){
+    else if (avio_check(srcnn_context->config_file_path, AVIO_FLAG_READ) > 0){
         if (avio_open(&config_file_context, srcnn_context->config_file_path, AVIO_FLAG_READ) < 0){
             av_log(context, AV_LOG_ERROR, "failed to open configuration file\n");
             return AVERROR(EIO);