aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2018-05-08 17:25:26 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2018-05-08 17:52:33 +0200
commit8007a86363930353a9df0007432fae73fc817dda (patch)
tree286ecc9f27f4919c7ab176ce0aad4317723e6c40 /libavfilter
parent6876a63368931fffd9d2aa228907aac685a6701e (diff)
downloadffmpeg-8007a86363930353a9df0007432fae73fc817dda.tar.gz
lavfi/vf_srcnn: use avio_check instead of access
The filter uses avio for file access already, and avio_check is portable. Fixes trac #7192.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_srcnn.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavfilter/vf_srcnn.c b/libavfilter/vf_srcnn.c
index dace2b99b5..edffebb278 100644
--- a/libavfilter/vf_srcnn.c
+++ b/libavfilter/vf_srcnn.c
@@ -28,9 +28,6 @@
#include "formats.h"
#include "internal.h"
#include "libavutil/opt.h"
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#include "vf_srcnn.h"
#include "libavformat/avio.h"
@@ -145,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);