From patchwork Thu Oct 20 07:12:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 38834 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp13138pzb; Thu, 20 Oct 2022 00:12:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Ad7Dy0yu9qsJbGk9ewYs0EvW1sE3iFwbtljfFbE6sTW4L1s2e9T7t3wnk+CbmRD0HxuTQ X-Received: by 2002:a17:907:2c4a:b0:78d:f5c2:70d1 with SMTP id hf10-20020a1709072c4a00b0078df5c270d1mr9978697ejc.198.1666249978983; Thu, 20 Oct 2022 00:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666249978; cv=none; d=google.com; s=arc-20160816; b=tLGdikHWfxBEO4nY1T3SU3QNxWKBbuA5fQo9AJUVn+6qRoYo+tPtS6zTjziMdZTOeV jFOodJRH6zMdTivlzJywQVXJtAhm7M5n5hiwfrPAGrTsWrDIoFNWvedE4yIdBE8FyBT3 pXH3xGn9cnlCQbe5/VrBQCcx1z8NiDyQrWfaPfhnefG0N6l+qxK5jkl6DmEhGSabp1zQ oLGP/Gx1rFS66RoS8/0+wAT8CeQqset2ERPj+oV941XVoNnEGnt+CwT5Q2wH0wyPJq+D wfAeZ5CGN07o5X0dcU12GkkSqAZl8Vn+5/IVcvLj9iDgigOltrcWc+SAbGz3jNj6tzqb aWGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=VFD4G5CQj7Nm8o5byGfvCZEI2gZde+P2I+tK754cJD0=; b=faIUGkHPlEf2BAauKMdu8qqJqA3Bx0v2e9ZI0HshQ5eX1T1SPTrrShxv3ZkRCpzlIQ pd78vIPfHLcWnHz/PkZoHIoRBg8S+wEFS9poSbiwGhsmxmAjsbZcq3FtC/U2GoLgXrZX wlHuxinOyR10ld/fdmlwGFAqPjbbP4OOsl/IfPIzXZA4t/TVOaB/f4SqS3+f+TSRHGpd 0lAlZV3TRuQhy5Dn0IQGQMKwRldoVNNUUnakTBAQ+ThYaWRW9bvZ1FCHxdotqSvhSrjn PyPJrQVhOKgfFm9w+KlHao7hl7BPdsYjNvL2f/YaImjM6DpD1AyM5qQmlmO7G2yk/Iyk XxcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q4-20020a056402248400b0045c21f435dbsi15827119eda.521.2022.10.20.00.12.58; Thu, 20 Oct 2022 00:12:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A4F468BC61; Thu, 20 Oct 2022 10:12:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C656368BC61 for ; Thu, 20 Oct 2022 10:12:48 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 346F02404E4 for ; Thu, 20 Oct 2022 09:12:48 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6AwvHEuzJOd7 for ; Thu, 20 Oct 2022 09:12:47 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 6B7A32400F4 for ; Thu, 20 Oct 2022 09:12:47 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id AF6483A0212 for ; Thu, 20 Oct 2022 09:12:38 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Oct 2022 09:12:28 +0200 Message-Id: <20221020071228.8531-1-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: rename read_file() to avoid conflict with libass 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +ysd/ZPQlI7v libass defines a non-static read_file() symbol, which causes conflicts with static linking. --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_mux_init.c | 4 ++-- fftools/ffmpeg_opt.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 2dcce45741..5966cac60e 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -702,7 +702,7 @@ void remove_avoptions(AVDictionary **a, AVDictionary *b); void assert_avoptions(AVDictionary *m); void assert_file_overwrite(const char *filename); -char *read_file(const char *filename); +char *file_read(const char *filename); AVDictionary *strip_specifiers(AVDictionary *dict); const AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder); int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global); diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index c8b2552104..c77260c24b 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -380,7 +380,7 @@ static char *get_ost_filters(OptionsContext *o, AVFormatContext *oc, } if (ost->filters_script) - return read_file(ost->filters_script); + return file_read(ost->filters_script); else if (ost->filters) return av_strdup(ost->filters); @@ -585,7 +585,7 @@ static OutputStream *new_video_stream(Muxer *mux, OptionsContext *o, int source_ av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE); } else { if (video_enc->flags & AV_CODEC_FLAG_PASS2) { - char *logbuffer = read_file(logfilename); + char *logbuffer = file_read(logfilename); if (!logbuffer) { av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n", diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index ead4ee1b38..9245e02813 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1300,7 +1300,7 @@ static int open_input_file(OptionsContext *o, const char *filename) } /* read file contents into a string */ -char *read_file(const char *filename) +char *file_read(const char *filename) { AVIOContext *pb = NULL; int ret = avio_open(&pb, filename, AVIO_FLAG_READ); @@ -1725,7 +1725,7 @@ static int opt_filter_complex(void *optctx, const char *opt, const char *arg) static int opt_filter_complex_script(void *optctx, const char *opt, const char *arg) { FilterGraph *fg; - char *graph_desc = read_file(arg); + char *graph_desc = file_read(arg); if (!graph_desc) return AVERROR(EINVAL);