From patchwork Sun Jul 30 22:51:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 4521 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.85 with SMTP id 82csp1772567vsb; Sun, 30 Jul 2017 15:51:27 -0700 (PDT) X-Received: by 10.223.136.231 with SMTP id g36mr11968819wrg.280.1501455087201; Sun, 30 Jul 2017 15:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501455087; cv=none; d=google.com; s=arc-20160816; b=jYXjztWfM3cTLte2JE45f/YRjn/VTViKwr4MskLnNjVFwv16vMrjbVwQ56L5Vzsb1g qaMLJN04KHmtYNGsDMs4wdRV5aDydRqtZ/hK9kZTqBoSN/XsnhDcxAszCxAawZFAaa7U 9lvUbQxwiGGr74rYC8sRDkZcdS9miEtWyv8+hF5nfnIQ5NKSCi52YKZyjvwD6a1FlatY Gj2iqHTYIAgZ9jnqvgB+RI+QiiZpavQCPU5bs/2FT81XD0OAuOUCZA7rUgorScY9FoEq ydgwnXkiMQdfj1R/0NFeUycFKIBChyJ9XO+t+PONMXT8Cm0n1M6rbPFSF/2XoLlQ+vbw JZyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=8wy/Ukgk7GkgDRcoblQr95Inn0rQ9OFTsO89OZSlr4k=; b=OvjqOpthwRsjtvEj8UP5IC8DdLBlmsXkr9c9/uuBVRBkVFEcawTV98G6DX2nReMrbK fl2qWPSbqzKuguN7Vw7EXI6K/IFmYbYylbHs9PaZdyO1ffEmUVWia7D2hfT1sxaTxnXV lzH/Bx2P3c8NJyuQIO/TE96RcXHjl2e8srn8H3B1Nfl77E4Bt1EWIMYqnb+cPt8qUXzH Z6TppuJFukwS/FVWq9OCtMh1edMdBLGICkZHeUO1R16SBg/GiMo61A4/4la1LttTN8g2 JitAbsge0gQa5bDkn1BAYy8MayxfQcLhaayhu2C+fgCrQqD87nx7Ib/MINCcyzbQ3BwP Miew== 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 k39si21302838wrc.533.2017.07.30.15.51.26; Sun, 30 Jul 2017 15:51:27 -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 A4BC368A0ED; Mon, 31 Jul 2017 01:51:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 03BB068A060 for ; Mon, 31 Jul 2017 01:51:06 +0300 (EEST) Received: from phare.normalesup.org (archicubes.ens.fr [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v6UMp8kG076097 for ; Mon, 31 Jul 2017 00:51:08 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id AE8ABE00D6; Mon, 31 Jul 2017 00:51:08 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Jul 2017 00:51:04 +0200 Message-Id: <20170730225106.31923-2-george@nsup.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170730225106.31923-1-george@nsup.org> References: <20170730225106.31923-1-george@nsup.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Mon, 31 Jul 2017 00:51:09 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 2/4] lavfi: search options on child objects. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The child objects must be allocated and inited in the preinit() callback. Signed-off-by: Nicolas George --- libavfilter/avfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index dcd975e104..6a97456054 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -897,7 +897,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, } } else { av_dict_set(options, key, value, 0); - if ((ret = av_opt_set(ctx->priv, key, value, 0)) < 0) { + if ((ret = av_opt_set(ctx->priv, key, value, AV_OPT_SEARCH_CHILDREN)) < 0) { if (!av_opt_find(ctx->priv, key, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { if (ret == AVERROR_OPTION_NOT_FOUND) av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key); @@ -948,7 +948,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) } if (ctx->filter->priv_class) { - ret = av_opt_set_dict(ctx->priv, options); + ret = av_opt_set_dict2(ctx->priv, options, AV_OPT_SEARCH_CHILDREN); if (ret < 0) { av_log(ctx, AV_LOG_ERROR, "Error applying options to the filter.\n"); return ret;