From patchwork Thu Aug 10 11:46:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 4674 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.46.211 with SMTP id u202csp2308312vsu; Thu, 10 Aug 2017 04:47:58 -0700 (PDT) X-Received: by 10.223.167.13 with SMTP id c13mr7647926wrd.72.1502365678023; Thu, 10 Aug 2017 04:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502365677; cv=none; d=google.com; s=arc-20160816; b=Mdj8flpJy9GEP1ar0hQJl4Ww6SMTQj3qz0DLijb+zzozF5aMVCYk7KTM5UtuIP5ZLz 8as7LfSDJCHiEmMBCkt7FgFg22uQMgFyHjUbl6vbEUVP4XQvqXgJa4MPy0nZTicBSeYs utcKKFfzPVd40fLAiAhxFzM2TvKqeFfdRKH9Ah0L2rfCmuL/XOcMumVHtbEJCs6lm5ZU c4I8a+zOmCP1yQmPkrLoLFaP+iYHxKyesCRvwCX8cuVRG7gyqY7B+yriTQ6h0guw8Gej ywvc6CtiZ2ABtS9b+qcNDqYLU6uoEnWejtVZJW+q19+SOv5Jw0nkjXmpiIWc+kX80oUh oe2g== 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=HK68cIFIahLsI4n6PJkYu++BlAEU0yiQaWSopWNZ1p4=; b=USDB/jUya6ES6Jocfn+YqgAb4fjImFVK6ihWF6G1LDLR5tLjRjz9dDaF/A97M/oy96 v5/S9jL/rYUoEJQNpV4xcHExJEX28RXCOBJMtOZrMIR4AS1hfh68kMfxpyMPOJR60BJM UpSRu8qw9ZQMvBNH/Twxd9wNe/zebw9hYOzcLqRQ4NzZS64WHmvFzxjXM26vDTFT8J47 nO1wLzevm/3LUUCq1rbcAaqa6BAHDB4cBubzCfm/7ndgUfhe4YbccS6bzIST2xRiXeHu kfVYylV0dGR6KUpQsnXDTzDAH+HK/vH4liy4F+Ch7C7XjY0GzD1R4sO+imrCBhVCun/4 nSYA== 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 d26si5236987wra.489.2017.08.10.04.47.57; Thu, 10 Aug 2017 04:47:57 -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 B8DAA689C98; Thu, 10 Aug 2017 14:46:55 +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 2C3A9689C4D for ; Thu, 10 Aug 2017 14:46:47 +0300 (EEST) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v7ABknH0043689 for ; Thu, 10 Aug 2017 13:46:49 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id 67BD8E00F5; Thu, 10 Aug 2017 13:46:49 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Thu, 10 Aug 2017 13:46:32 +0200 Message-Id: <20170810114642.26779-6-george@nsup.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170810114642.26779-1-george@nsup.org> References: <20170810114642.26779-1-george@nsup.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Thu, 10 Aug 2017 13:46:49 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 06/16] 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(-) Unchanged. 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;