diff mbox series

[FFmpeg-devel,v4,2/2] avcodec/dvdsubdec: use av_fopen_utf8() instead of plain fopen()

Message ID 68192b1a1e2392a978126f93fd2adde4d4bce3a0.1652790597.git.ffmpegagent@gmail.com
State New
Headers show
Series use av_fopen_utf8() instead of plain fopen() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Aman Karmani May 17, 2022, 12:29 p.m. UTC
From: softworkz <softworkz@hotmail.com>

Unify file access operations by replacing usages of direct calls
to posix fopen() to prepare for long filename support on Windows.

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libavcodec/dvdsubdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 30fe4d41de..19b78b3eb1 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -617,7 +617,7 @@  static int parse_ifo_palette(DVDSubContext *ctx, char *p)
     const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
 
     ctx->has_palette = 0;
-    if ((ifo = fopen(p, "r")) == NULL) {
+    if ((ifo = av_fopen_utf8(p, "r")) == NULL) {
         av_log(ctx, AV_LOG_WARNING, "Unable to open IFO file \"%s\": %s\n", p, av_err2str(AVERROR(errno)));
         return AVERROR_EOF;
     }