From patchwork Thu Jun 30 10:40:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Gaullier X-Patchwork-Id: 36552 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b27:b0:88:1bbf:7fd2 with SMTP id l39csp217544pzh; Thu, 30 Jun 2022 03:40:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toLhNFd52dp9+upBcnYii1xuNnJAg137Zv4J5ttihXxN4/0RSFbtevz5JsLySdgTQgxMJr X-Received: by 2002:a05:6402:2706:b0:437:75f2:402c with SMTP id y6-20020a056402270600b0043775f2402cmr10567671edd.245.1656585652357; Thu, 30 Jun 2022 03:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656585652; cv=none; d=google.com; s=arc-20160816; b=Kll8H0o9w6abFevYySqw83Pua0/vDltKe76vv2msqACtMWnMD2djyK48ZH7B+wVw3M sZGtMAyY2sISo8t0P7TbZOvlzIEdVbiR9Is7kPIlBQeXngDJcvl9FG5Kv/qEiigEWX0g cdyMieGaAkJOGTjULPAhiCvYEl7+LP8Fatnp2y/uMsNANsvjycGK23ZsqJp3Y9suRNH/ atBAH7XfakvhOycMDkovj1yvST8DAfEGVchqw6xznP9u4V9yxkmwfhEcdxTZwyajkotL X9kqyKSmqiXMmL5QxYJwZqhtQRqoKXlIhuh9u7kgk2eFvq1sImak3XiQF0Rb0PI8NT0x +s1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=N+ywdFq16UsP3OSEvy9VkiEy0gcC9AiGEn/mqB06Hv8=; b=TCmgOzqB4ujrkeYEPvIzO8ca3N5C0TB+2H0W8Sd4yuRnzJ9tuZaz36IK/te1qFYZqP VmaHOJrTHEmK5ZsBuzGmyKQyrfEGLSQ3NEhgFN7u1nG6ESTntuyC65ixMrKMOtWOd7wm nV8Ae5handVP5U+1KTecfZEEIo55sCwDt5q9LgGHZg8H86qBUPEmMQNzKXLQQuUBIb85 OHny9ER5vW8MyCcomu8R9OTbdV0efjdZ0WiPmyqnF9RubbyQ7rbZeBilBn4PZtE9dKy5 r8/rBfY39k9Jp5iuXSiLtbRENCFL4BaU/MNEBYPRgoL0GfT5JugkUGgs0EAVHLlVej52 js0g== 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 dr12-20020a170907720c00b0072a431211a5si4680677ejc.440.2022.06.30.03.40.51; Thu, 30 Jun 2022 03:40:52 -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 AA50068B677; Thu, 30 Jun 2022 13:40:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from srv-infra-1.infra.inf.glb.tvvideoms.com (www.inf.tvvideoms.com [213.205.126.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48A5B68B456 for ; Thu, 30 Jun 2022 13:40:41 +0300 (EEST) Received: from cji.paris (unknown [172.16.3.159]) by srv-infra-1.infra.inf.glb.tvvideoms.com (Postfix) with ESMTP id EB87121574; Thu, 30 Jun 2022 10:40:39 +0000 (UTC) From: Nicolas Gaullier To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 Jun 2022 12:40:35 +0200 Message-Id: <20220630104035.765-1-nicolas.gaullier@cji.paris> X-Mailer: git-send-email 2.36.1.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools: Fix preset search pathes (regression since 13350e81fd) 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: Nicolas Gaullier Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: XRsiMDN9LHBe Fix looking for .ffmpeg subfolder in FFMPEG_DATADIR and inversely not in HOME. Fix search order (documentation). --- fftools/cmdutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 69a6f54ea3..fcaefb9f1e 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -822,8 +822,8 @@ FILE *get_preset_file(char *filename, size_t filename_size, #endif char *env_home = getenv_utf8("HOME"); char *env_ffmpeg_datadir = getenv_utf8("FFMPEG_DATADIR"); - const char *base[3] = { env_home, - env_ffmpeg_datadir, + const char *base[3] = { env_ffmpeg_datadir, + env_home, /* HOME is special: search in a .ffmpeg subfolder */ FFMPEG_DATADIR, }; if (is_path) {