Skip to content

Commit

Permalink
Switch uses of av_fopen_utf8 to avpriv_fopen_utf8
Browse files Browse the repository at this point in the history
The former has been deprecated.

Signed-off-by: Martin Storsjö <martin@martin.st>
  • Loading branch information
mstorsjo committed May 23, 2022
1 parent 4cdc14a commit 6076dbc
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libavfilter/af_arnndn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ static int open_model(AVFilterContext *ctx, RNNModel **model)

if (!s->model_name)
return AVERROR(EINVAL);
f = av_fopen_utf8(s->model_name, "r");
f = avpriv_fopen_utf8(s->model_name, "r");
if (!f) {
av_log(ctx, AV_LOG_ERROR, "Failed to open model file: %s\n", s->model_name);
return AVERROR(EINVAL);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int ff_opencl_filter_load_program_from_file(AVFilterContext *avctx,
const char *src_const;
int err;

file = av_fopen_utf8(filename, "r");
file = avpriv_fopen_utf8(filename, "r");
if (!file) {
av_log(avctx, AV_LOG_ERROR, "Unable to open program "
"source file \"%s\".\n", filename);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_curves.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static int dump_curves(const char *fname, uint16_t *graph[NB_COMP + 1],
AVBPrint buf;
const double scale = 1. / (lut_size - 1);
static const char * const colors[] = { "red", "green", "blue", "#404040", };
FILE *f = av_fopen_utf8(fname, "w");
FILE *f = avpriv_fopen_utf8(fname, "w");

av_assert0(FF_ARRAY_ELEMS(colors) == NB_COMP + 1);

Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_dnn_classify.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static int read_classify_label_file(AVFilterContext *context)
FILE *file;
DnnClassifyContext *ctx = context->priv;

file = av_fopen_utf8(ctx->labels_filename, "r");
file = avpriv_fopen_utf8(ctx->labels_filename, "r");
if (!file){
av_log(context, AV_LOG_ERROR, "failed to open file %s\n", ctx->labels_filename);
return AVERROR(EINVAL);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_dnn_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static int read_detect_label_file(AVFilterContext *context)
FILE *file;
DnnDetectContext *ctx = context->priv;

file = av_fopen_utf8(ctx->labels_filename, "r");
file = avpriv_fopen_utf8(ctx->labels_filename, "r");
if (!file){
av_log(context, AV_LOG_ERROR, "failed to open file %s\n", ctx->labels_filename);
return AVERROR(EINVAL);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_fieldhint.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static av_cold int init(AVFilterContext *ctx)
av_log(ctx, AV_LOG_ERROR, "Hint file must be set.\n");
return AVERROR(EINVAL);
}
s->hint = av_fopen_utf8(s->hint_file_str, "r");
s->hint = avpriv_fopen_utf8(s->hint_file_str, "r");
if (!s->hint) {
ret = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "%s: %s\n", s->hint_file_str, av_err2str(ret));
Expand Down
4 changes: 2 additions & 2 deletions libavfilter/vf_lut3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ static av_cold int lut3d_init(AVFilterContext *ctx)
return set_identity_matrix(ctx, 32);
}

f = av_fopen_utf8(lut3d->file, "r");
f = avpriv_fopen_utf8(lut3d->file, "r");
if (!f) {
ret = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "%s: %s\n", lut3d->file, av_err2str(ret));
Expand Down Expand Up @@ -2134,7 +2134,7 @@ static av_cold int lut1d_init(AVFilterContext *ctx)
return 0;
}

f = av_fopen_utf8(lut1d->file, "r");
f = avpriv_fopen_utf8(lut1d->file, "r");
if (!f) {
ret = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "%s: %s\n", lut1d->file, av_err2str(ret));
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_nnedi.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static av_cold int init(AVFilterContext *ctx)
size_t bytes_read;
int ret = 0;

weights_file = av_fopen_utf8(s->weights_file, "rb");
weights_file = avpriv_fopen_utf8(s->weights_file, "rb");
if (!weights_file) {
av_log(ctx, AV_LOG_ERROR, "No weights file provided, aborting!\n");
return AVERROR(EINVAL);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/vf_paletteuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ static void disp_node(AVBPrint *buf,
static int disp_tree(const struct color_node *node, const char *fname)
{
AVBPrint buf;
FILE *f = av_fopen_utf8(fname, "w");
FILE *f = avpriv_fopen_utf8(fname, "w");

if (!f) {
int ret = AVERROR(errno);
Expand Down
2 changes: 1 addition & 1 deletion libavformat/ipfsgateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static int populate_ipfs_gateway(URLContext *h)
}

// Get the contents of the gateway file.
gateway_file = av_fopen_utf8(ipfs_gateway_file, "r");
gateway_file = avpriv_fopen_utf8(ipfs_gateway_file, "r");
if (!gateway_file) {
av_log(h, AV_LOG_WARNING,
"The IPFS gateway file (full uri: %s) doesn't exist. "
Expand Down

0 comments on commit 6076dbc

Please sign in to comment.