You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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.
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -3389,7 +3389,7 @@ spectrumsynth_filter_deps="avcodec"
|
|||||||
spectrumsynth_filter_select="fft"
|
spectrumsynth_filter_select="fft"
|
||||||
spp_filter_deps="gpl avcodec"
|
spp_filter_deps="gpl avcodec"
|
||||||
spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp"
|
spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp"
|
||||||
srcnn_filter_deps="access avformat"
|
srcnn_filter_deps="avformat"
|
||||||
stereo3d_filter_deps="gpl"
|
stereo3d_filter_deps="gpl"
|
||||||
subtitles_filter_deps="avformat avcodec libass"
|
subtitles_filter_deps="avformat avcodec libass"
|
||||||
super2xsai_filter_deps="gpl"
|
super2xsai_filter_deps="gpl"
|
||||||
|
@@ -28,9 +28,6 @@
|
|||||||
#include "formats.h"
|
#include "formats.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
#include "vf_srcnn.h"
|
#include "vf_srcnn.h"
|
||||||
#include "libavformat/avio.h"
|
#include "libavformat/avio.h"
|
||||||
|
|
||||||
@@ -145,7 +142,7 @@ static av_cold int init(AVFilterContext* context)
|
|||||||
srcnn_context->conv3.size = 5;
|
srcnn_context->conv3.size = 5;
|
||||||
CHECK_ALLOCATION(allocate_copy_conv_data(&srcnn_context->conv3, conv3_kernel, conv3_biases), )
|
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){
|
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");
|
av_log(context, AV_LOG_ERROR, "failed to open configuration file\n");
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
Reference in New Issue
Block a user