Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: softworkz <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: softworkz <softworkz@hotmail.com>
Subject: [FFmpeg-devel] [PATCH 1/2] fftools: use av_fopen_utf8() instead of plain fopen()
Date: Sat, 07 May 2022 17:39:08 +0000
Message-ID: <5802c8526c48ceecf775ce49ffcac0e15b8981c3.1651945149.git.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.26.ffstaging.FFmpeg.1651945149.ffmpegagent@gmail.com>

From: softworkz <softworkz@hotmail.com>

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 fftools/cmdutils.c   | 6 +++---
 fftools/ffmpeg.c     | 4 ++--
 fftools/opt_common.c | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 5d7cdc3e10..ca3a4c267a 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -818,7 +818,7 @@ FILE *get_preset_file(char *filename, size_t filename_size,
 
     if (is_path) {
         av_strlcpy(filename, preset_name, filename_size);
-        f = fopen(filename, "r");
+        f = av_fopen_utf8(filename, "r");
     } else {
 #if HAVE_GETMODULEHANDLE && defined(_WIN32)
         char datadir[MAX_PATH], *ls;
@@ -842,13 +842,13 @@ FILE *get_preset_file(char *filename, size_t filename_size,
                 continue;
             snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i],
                      i != 1 ? "" : "/.ffmpeg", preset_name);
-            f = fopen(filename, "r");
+            f = av_fopen_utf8(filename, "r");
             if (!f && codec_name) {
                 snprintf(filename, filename_size,
                          "%s%s/%s-%s.ffpreset",
                          base[i], i != 1 ? "" : "/.ffmpeg", codec_name,
                          preset_name);
-                f = fopen(filename, "r");
+                f = av_fopen_utf8(filename, "r");
             }
         }
     }
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index a85ed18b08..a9bd4a790f 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1261,9 +1261,9 @@ static void do_video_stats(OutputStream *ost, int frame_size)
 
     /* this is executed just the first time do_video_stats is called */
     if (!vstats_file) {
-        vstats_file = fopen(vstats_filename, "w");
+        vstats_file = av_fopen_utf8(vstats_filename, "w");
         if (!vstats_file) {
-            perror("fopen");
+            perror("av_fopen_utf8");
             exit_program(1);
         }
     }
diff --git a/fftools/opt_common.c b/fftools/opt_common.c
index c303db4d09..dda199d412 100644
--- a/fftools/opt_common.c
+++ b/fftools/opt_common.c
@@ -1178,7 +1178,7 @@ int init_report(const char *env, FILE **file)
     if (!envlevel)
         report_file_level = FFMAX(report_file_level, prog_loglevel);
 
-    report_file = fopen(filename.str, "w");
+    report_file = av_fopen_utf8(filename.str, "w");
     if (!report_file) {
         int ret = AVERROR(errno);
         av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n",
-- 
ffmpeg-codebot

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2022-05-07 17:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07 17:39 [FFmpeg-devel] [PATCH 0/2] " ffmpegagent
2022-05-07 17:39 ` softworkz [this message]
2022-05-08 20:03   ` [FFmpeg-devel] [PATCH 1/2] fftools: " Martin Storsjö
2022-05-09  0:21     ` Soft Works
2022-05-07 17:39 ` [FFmpeg-devel] [PATCH 2/2] avfilter: " softworkz
2022-05-09 18:52 ` [FFmpeg-devel] [PATCH v2] " softworkz
2022-05-10 20:12   ` Martin Storsjö
2022-05-10 23:03     ` Soft Works
2022-05-17  0:39   ` [FFmpeg-devel] [PATCH v3 0/2] " ffmpegagent
2022-05-17  0:39     ` [FFmpeg-devel] [PATCH v3 1/2] avfilter: " softworkz
2022-05-17  0:39     ` [FFmpeg-devel] [PATCH v3 2/2] avfilter/dvdsubdec: " softworkz
2022-05-17 11:56     ` [FFmpeg-devel] [PATCH v3 0/2] " Tobias Rapp
2022-05-17 12:26       ` Soft Works
2022-05-17 12:29     ` [FFmpeg-devel] [PATCH v4 " ffmpegagent
2022-05-17 12:29       ` [FFmpeg-devel] [PATCH v4 1/2] avfilter: " softworkz
2022-05-17 12:29       ` [FFmpeg-devel] [PATCH v4 2/2] avcodec/dvdsubdec: " softworkz
2022-05-18  7:01       ` [FFmpeg-devel] [PATCH v4 0/2] " Tobias Rapp
2022-05-19 21:39         ` Soft Works
2022-05-19 21:40       ` [FFmpeg-devel] [PATCH v5 0/3] " ffmpegagent
2022-05-19 21:40         ` [FFmpeg-devel] [PATCH v5 1/3] avfilter: " softworkz
2022-05-19 21:40         ` [FFmpeg-devel] [PATCH v5 2/3] avcodec/dvdsubdec: " softworkz
2022-05-19 21:40         ` [FFmpeg-devel] [PATCH v5 3/3] avfilter: Make avpriv_open a library-internal function on msvcrt softworkz
2022-05-19 23:15         ` [FFmpeg-devel] [PATCH v6 0/3] use av_fopen_utf8() instead of plain fopen() ffmpegagent
2022-05-19 23:15           ` [FFmpeg-devel] [PATCH v6 1/3] avfilter: " softworkz
2022-05-19 23:15           ` [FFmpeg-devel] [PATCH v6 2/3] avcodec/dvdsubdec: " softworkz
2022-05-19 23:15           ` [FFmpeg-devel] [PATCH v6 3/3] avfilter: Make avpriv_open a library-internal function on msvcrt softworkz
2022-05-23 11:26           ` [FFmpeg-devel] [PATCH v7 0/2] use av_fopen_utf8() instead of plain fopen() ffmpegagent
2022-05-23 11:26             ` [FFmpeg-devel] [PATCH v7 1/2] avfilter: " softworkz
2022-05-23 11:26             ` [FFmpeg-devel] [PATCH v7 2/2] avcodec/dvdsubdec: " softworkz
2022-05-24  8:55             ` [FFmpeg-devel] [PATCH v7 0/2] " Martin Storsjö

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5802c8526c48ceecf775ce49ffcac0e15b8981c3.1651945149.git.ffmpegagent@gmail.com \
    --to=ffmpegagent@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=softworkz@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git