Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: ffmpegagent <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: "Martin Storsjö" <martin@martin.st>,
	softworkz <softworkz@hotmail.com>,
	"Tobias Rapp" <t.rapp@noa-archive.com>
Subject: [FFmpeg-devel] [PATCH v7 0/2] use av_fopen_utf8() instead of plain fopen()
Date: Mon, 23 May 2022 11:26:08 +0000
Message-ID: <pull.26.v7.ffstaging.FFmpeg.1653305170.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.26.v6.ffstaging.FFmpeg.1653002114.ffmpegagent@gmail.com>

Unify file access operations by replacing usages of direct calls to posix
fopen()

v2: Remove changes to fftools for now
v3: Add some additional replacements
v4: Fix and improve commit messages
v5: Add patch to remap ff_open in libavfilter for MSVC on Windows
v6: Add avfilter/file_open.c to "Files without standard license headers"
list
v7: Rebase and use the new avpriv_fopen_utf8() instead

softworkz (2):
  avfilter: use av_fopen_utf8() instead of plain fopen()
  avcodec/dvdsubdec: use av_fopen_utf8() instead of plain fopen()

 libavcodec/dvdsubdec.c            | 2 +-
 libavfilter/af_firequalizer.c     | 2 +-
 libavfilter/vf_deshake.c          | 2 +-
 libavfilter/vf_psnr.c             | 2 +-
 libavfilter/vf_signature.c        | 4 ++--
 libavfilter/vf_ssim.c             | 2 +-
 libavfilter/vf_vidstabdetect.c    | 2 +-
 libavfilter/vf_vidstabtransform.c | 2 +-
 libavfilter/vf_vmafmotion.c       | 2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)


base-commit: 6076dbcb55d0c9b6693d1acad12a63f7268301aa
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-26%2Fsoftworkz%2Fsubmit_replace_fopen-v7
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-26/softworkz/submit_replace_fopen-v7
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/26

Range-diff vs v6:

 1:  bcafcfacea ! 1:  aabfa10d44 avfilter: use av_fopen_utf8() instead of plain fopen()
     @@ libavfilter/af_firequalizer.c: static int generate_kernel(AVFilterContext *ctx,
               return ret;
       
      -    if (s->dumpfile && (!s->dump_buf || !s->analysis_rdft || !(dump_fp = fopen(s->dumpfile, "w"))))
     -+    if (s->dumpfile && (!s->dump_buf || !s->analysis_rdft || !(dump_fp = av_fopen_utf8(s->dumpfile, "w"))))
     ++    if (s->dumpfile && (!s->dump_buf || !s->analysis_rdft || !(dump_fp = avpriv_fopen_utf8(s->dumpfile, "w"))))
               av_log(ctx, AV_LOG_WARNING, "dumping failed.\n");
       
           vars[VAR_CHS] = inlink->ch_layout.nb_channels;
     @@ libavfilter/vf_deshake.c: static av_cold int init(AVFilterContext *ctx)
       
           if (deshake->filename)
      -        deshake->fp = fopen(deshake->filename, "w");
     -+        deshake->fp = av_fopen_utf8(deshake->filename, "w");
     ++        deshake->fp = avpriv_fopen_utf8(deshake->filename, "w");
           if (deshake->fp)
               fwrite("Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom\n", 1, 104, deshake->fp);
       
     @@ libavfilter/vf_psnr.c: static av_cold int init(AVFilterContext *ctx)
                   s->stats_file = stdout;
               } else {
      -            s->stats_file = fopen(s->stats_file_str, "w");
     -+            s->stats_file = av_fopen_utf8(s->stats_file_str, "w");
     ++            s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w");
                   if (!s->stats_file) {
                       int err = AVERROR(errno);
                       char buf[128];
     @@ libavfilter/vf_signature.c: static int xml_export(AVFilterContext *ctx, StreamCo
           unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 };
       
      -    f = fopen(filename, "w");
     -+    f = av_fopen_utf8(filename, "w");
     ++    f = avpriv_fopen_utf8(filename, "w");
           if (!f) {
               int err = AVERROR(EINVAL);
               char buf[128];
     @@ libavfilter/vf_signature.c: static int binary_export(AVFilterContext *ctx, Strea
               return AVERROR(ENOMEM);
       
      -    f = fopen(filename, "wb");
     -+    f = av_fopen_utf8(filename, "wb");
     ++    f = avpriv_fopen_utf8(filename, "wb");
           if (!f) {
               int err = AVERROR(EINVAL);
               char buf[128];
     @@ libavfilter/vf_ssim.c: static av_cold int init(AVFilterContext *ctx)
                   s->stats_file = stdout;
               } else {
      -            s->stats_file = fopen(s->stats_file_str, "w");
     -+            s->stats_file = av_fopen_utf8(s->stats_file_str, "w");
     ++            s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w");
                   if (!s->stats_file) {
                       int err = AVERROR(errno);
                       char buf[128];
     @@ libavfilter/vf_vidstabdetect.c: static int config_input(AVFilterLink *inlink)
           av_log(ctx, AV_LOG_INFO, "        result = %s\n", s->result);
       
      -    s->f = fopen(s->result, "w");
     -+    s->f = av_fopen_utf8(s->result, "w");
     ++    s->f = avpriv_fopen_utf8(s->result, "w");
           if (s->f == NULL) {
               av_log(ctx, AV_LOG_ERROR, "cannot open transform file %s\n", s->result);
               return AVERROR(EINVAL);
     @@ libavfilter/vf_vidstabtransform.c: static int config_input(AVFilterLink *inlink)
           av_log(ctx, AV_LOG_INFO, "    interpol  = %s\n", getInterpolationTypeName(tc->conf.interpolType));
       
      -    f = fopen(tc->input, "r");
     -+    f = av_fopen_utf8(tc->input, "r");
     ++    f = avpriv_fopen_utf8(tc->input, "r");
           if (!f) {
               int ret = AVERROR(errno);
               av_log(ctx, AV_LOG_ERROR, "cannot open input file %s\n", tc->input);
     @@ libavfilter/vf_vmafmotion.c: static av_cold int init(AVFilterContext *ctx)
                   s->stats_file = stdout;
               } else {
      -            s->stats_file = fopen(s->stats_file_str, "w");
     -+            s->stats_file = av_fopen_utf8(s->stats_file_str, "w");
     ++            s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w");
                   if (!s->stats_file) {
                       int err = AVERROR(errno);
                       char buf[128];
 2:  94d023ece3 ! 2:  a5266db995 avcodec/dvdsubdec: use av_fopen_utf8() instead of plain fopen()
     @@ libavcodec/dvdsubdec.c: static int parse_ifo_palette(DVDSubContext *ctx, char *p
       
           ctx->has_palette = 0;
      -    if ((ifo = fopen(p, "r")) == NULL) {
     -+    if ((ifo = av_fopen_utf8(p, "r")) == NULL) {
     ++    if ((ifo = avpriv_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;
           }
 3:  4035d5dd7b < -:  ---------- avfilter: Make avpriv_open a library-internal function on msvcrt

-- 
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".

  parent reply	other threads:[~2022-05-23 11:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07 17:39 [FFmpeg-devel] [PATCH " ffmpegagent
2022-05-07 17:39 ` [FFmpeg-devel] [PATCH 1/2] fftools: " softworkz
2022-05-08 20:03   ` 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           ` ffmpegagent [this message]
2022-05-23 11:26             ` [FFmpeg-devel] [PATCH v7 1/2] avfilter: use av_fopen_utf8() instead of plain fopen() 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=pull.26.v7.ffstaging.FFmpeg.1653305170.ffmpegagent@gmail.com \
    --to=ffmpegagent@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=martin@martin.st \
    --cc=softworkz@hotmail.com \
    --cc=t.rapp@noa-archive.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