From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id A55B743174 for ; Mon, 23 May 2022 11:26:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B2C5A68B47B; Mon, 23 May 2022 14:26:20 +0300 (EEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A964068B1E1 for ; Mon, 23 May 2022 14:26:13 +0300 (EEST) Received: by mail-pf1-f177.google.com with SMTP id p8so13396162pfh.8 for ; Mon, 23 May 2022 04:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=mu27RuIEG0oS8nVNc6CcLvIrMSrAZH+wD28O+8C+AsI=; b=KgKSGBILoEZ7C6owgdHytNdc9jROIWltnlmlSvztfLR0TiOVoeOhWt0GeEk+r2u+S9 Kxdpzgi3smGg8OMlbwJ0Q/v5qgi//eTZPsiryk5xFHC4Bu4LGKL5PwSijPzRZebFsp+m 6MU22oI/STkg+Arr5RHLHsKszlrFHyFWWEsp22UxUZFd/oqLjenPW2gYrjVvezPuqu7a qnwiFsuTNBQUq69BWUu/DVjL9K/dqHaB8VNCpQE5l7yUNa2TfI6D8khs6tW1d/LaYNaV bH9cYOF/y7K9MGCzYpHnHuummET94ICYlO8Z3InKx/L9QdF21hWPqGEVcGjKLqKcXOzT J/wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=mu27RuIEG0oS8nVNc6CcLvIrMSrAZH+wD28O+8C+AsI=; b=QcYc1rmHxm2qXO2gd9kWeoSPdzXJcJ40UtdbpiqsCG/qIk2zo8Fjl7FrlH3cI+Rl9R P/EH9cxkvJx6qGgAWyAn/57aNYm1Fl+oBp5rdUbea+hgHslcSefTuM78JJgCtvS205cs luiF3bqbXnQRpYvRVatWtoqfnE5StyuW8PQDLHYhoNcSWY5vhIwyI5NQ2Itc9hspJADJ 8sZBunYlZAfa43E1ouad9aWP+XEwsy8E5qhUQCgnmZ8Ve2qSXeRP46J34AytEX05pNrJ WJseEse1mJEIriPs9XBNbE/1CqIU+j8QWlaKS2bBFuzxDJNV4Klx535L40pnVPh+J1am Spnw== X-Gm-Message-State: AOAM533M/cguyTXDr/7ClBvgIEEN5WFUcLfoRahwemetaC0NhwHv1iZR 93cTWYjwpQDWeo9mNAa031PHM82WLotvcQ== X-Google-Smtp-Source: ABdhPJy/vuaHLg1YhDjbvvD9rtY9b7uyASmdefnPDUJB2U/f5+o/DXkXesFu+Qkh8aKvjUvrmPX+QA== X-Received: by 2002:a05:6a00:ac1:b0:4f1:29e4:b3a1 with SMTP id c1-20020a056a000ac100b004f129e4b3a1mr23394328pfl.63.1653305171722; Mon, 23 May 2022 04:26:11 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id m15-20020a17090a2c0f00b001dd11e4b927sm6956667pjd.39.2022.05.23.04.26.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 May 2022 04:26:11 -0700 (PDT) Message-Id: In-Reply-To: References: From: ffmpegagent Date: Mon, 23 May 2022 11:26:08 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v7 0/2] use av_fopen_utf8() instead of plain fopen() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Martin =?UTF-8?Q?Storsj=C3=B6?= , softworkz , Tobias Rapp Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".