From patchwork Mon Jul 31 12:02:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 4541 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.85 with SMTP id 82csp2323988vsb; Mon, 31 Jul 2017 05:03:35 -0700 (PDT) X-Received: by 10.28.69.197 with SMTP id l66mr10319841wmi.140.1501502615461; Mon, 31 Jul 2017 05:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501502615; cv=none; d=google.com; s=arc-20160816; b=V5Ph4mz0pAw1/LRgpEQXStrIkq6F9CZITRo9+kVL8HydTlTsO+iDDn8b16U5GCi/lC A2grRpNlN2nLdSMOIkVIZS/LqJqiakweTnReOo4BjyOLWAhqzMyhXOGN8jMWHUFbd3/j rgaf5ZdCtYSFmyCQ0DLsM2HS4fI1GXekqT2h+BsUVGp+DRGx/ltD/OvP8U+AyAwjrD29 NnPD5LyuChyxx/yJC7AeLBlfZnmGv+jNJWEn0yZv2aUpVkZku9fOs82ndp4/PSDxCSub k0K5XDMfMW0SglP5lR93VbHBNsPOCZqrocNJDHhiprJalbZP5rykwNFZIq8JhWOTW4YK 6NWA== 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=ICgqkVrzajePHuI3wtH+IMt/vwpD124Cl+648lH8pfHXC8hx5OJaZFK9NtfhwjDw03 2YzVBWXSeapj6mdnmaopCePXxZX+Tje9e7pRRKW1bUuibbvRi1bWot1IhKjPmz4BndNl wXqsW6QR0yLMXCHMHrCgkSYrctsMgPA64/u324LH0+6qnyvs1/uIX+zms63oqKdMAQs+ gxM57QCJQgW4uqhyUvIykWBUUubVH9Yi5KIAkuPgFZBGcEsE8+OZlP11SaC8khUUaK/o Me+sEMEk4IhhYrEto9wJhFdChdXAiNJZ0CF0O38dmLpG1bWJh8e2nS/iGNKZ4vWRaPfm +jmg== 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 d23si22416119wrc.498.2017.07.31.05.03.35; Mon, 31 Jul 2017 05:03:35 -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 ABF8B68A226; Mon, 31 Jul 2017 15:02:41 +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 71AED68A1F0 for ; Mon, 31 Jul 2017 15:02:31 +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 v6VC2Wtk071505 for ; Mon, 31 Jul 2017 14:02:32 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id 2C8CEE00FB; Mon, 31 Jul 2017 14:02:32 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Jul 2017 14:02:18 +0200 Message-Id: <20170731120227.31047-5-george@nsup.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170731120227.31047-1-george@nsup.org> References: <20170731120227.31047-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 14:02:32 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 05/14] 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;