From patchwork Fri Nov 25 01:30:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 39410 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp4948382pzb; Thu, 24 Nov 2022 17:31:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf6I5qmqfLWRVNtPEoK/A8kC0Mi2kGGmjYdKTpY5wu8RJCtWi9HjcIuyvTYJAY/kFxWeFczb X-Received: by 2002:a17:906:8252:b0:7b8:3098:a067 with SMTP id f18-20020a170906825200b007b83098a067mr13559807ejx.701.1669339892560; Thu, 24 Nov 2022 17:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669339892; cv=none; d=google.com; s=arc-20160816; b=Diq08DbC9GqkfmH2WmyfwuOXjclMoDHQC9qYMFTrgCAjUwtc1H+DzNIQtcgSBmaQi3 PYKTMpWv73j773s7y7BNXzVaep7xg0zM4gcxHYBRrLr5IJS3ybuv41UoP/OVUBukxtAh TxCyIOn/42hCLBD7X1WI6u3vmwPjdV2Jv24fpfCorkcVI4SwY1gR7/5GHQ04wVEwPyHc sz8iay9Kmg/e9H9MePdQ1xDmv5DvywCI0jQDgPJuadW9TgjTUk+3IupwwIZDG7c9khCR LdTYjuww3eTbV5VzXA3h30k35GtnB/Z5DJTvbAHd4ILTImnkCPB39UofGIIBiCkL9k2m 4crQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=gk73GVKw5rnZNbPjSToul/fsmPMuI2cn8dOF5PZY5BM=; b=jZV6ihQquUJLeCaKQyMSidUcUw8PfWAJATCW9kPZerulrp0cqHHKnHneSBinOsz3b2 iq6GhG0jhr8zsilCF6rjjwpVADR+yBl3pKrryxO8G7/pfDog8Y+ghVfDETb2dsou4cMB jO6UEehGGANZ2Gs2B48we/34atQHbAVeBL179zCXVTBS7YN859l6f7CH7F8CCsJt7gaE x/RyEQK3QjlIBSj8yWZkmxx444OeaVM/OQ9bMoyWwQm7dsAnsEn3Xe+w1HXUMisen8ND s4uu+YyblzBlM753iVKzFI0ruoswsY38PwL19G43rmmGFSlc97pO4ehIS+1JtC61MM/R j+4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=CTdjQ191; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id eb5-20020a0564020d0500b0046a711ae23csi1751004edb.515.2022.11.24.17.31.32; Thu, 24 Nov 2022 17:31:32 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=CTdjQ191; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D17DB68BA82; Fri, 25 Nov 2022 03:31:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3015C68BA9D for ; Fri, 25 Nov 2022 03:30:58 +0200 (EET) Received: by mail-ej1-f49.google.com with SMTP id ud5so7276858ejc.4 for ; Thu, 24 Nov 2022 17:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pB6rZQ8AAc6k9zkhaEvwhA73YWfzxGi7cAx3LLPAXvU=; b=CTdjQ191EjvFj/jqTaoyk5IJyU8+rhJtbA/TPOYLHtTAmlMNU7yNhcWKERafHCNrUP dP1X9CcM95K1ZYpPzafIPiGGUFXWPr5D4d9WLD5Xb5r3/VQjcNJp+ykinQOifnLou3WF 4IR+3XaKxg7kjxUIbDgRJ+Up1JMOzVmwUDS0lmZ3kaE5t/nE89T8Gx8Qwu1at3eHzLJd yNAnIMnMb2neT6m3/MIlNd0RjPI0T5ugaimEKyZrYBB1udqQoRdtRJRpnAALJ+2/kfpy 1qAA4Mr1mSje2cvfvTGgG9eLTIKeWZrNNTBg/sYw9f5xP8TaMK4TM4u/V9AsKd3/k6aK cp4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pB6rZQ8AAc6k9zkhaEvwhA73YWfzxGi7cAx3LLPAXvU=; b=GQLYQK40svOF5Raeb1R98LwnoW6vUHsTwH78w3IraOJ4anynN4RHV7TGjLM0ZPgu8I KdvGsbCh6VrIM1efjerbLHbkthcY1MgbKYQdoyDiJ/WovQSDZlQ97OU3BCcZMXBM4tXR fStStGbFwNHZzMUABlKJ4IgyBeFx9PNSmd5yPRwO7CMSf7nomVcv4hAImhd8R2O6MZaR v+et6harS1XEzAUFPhhljIDGWZ1chBdkvM/JHy0wQakdaZMhBCxFtX1s27aFM5tOBHmk yjOPv5tRUwfIKmD3Rode3+boDxV1kwgo69YTiRBtY9eM1QXICLLPYFYWVGxl0AzEWCK9 KPHw== X-Gm-Message-State: ANoB5pl6rJf2KBL368Q9UmqkMhb8itn+/oJoBYn8dRnV+k2dyNND5BSv hdaRUNsK/Ihnoomb7LpA+kWekf3xMLU= X-Received: by 2002:a17:906:1244:b0:78d:d4ca:21f7 with SMTP id u4-20020a170906124400b0078dd4ca21f7mr30240835eja.128.1669339858381; Thu, 24 Nov 2022 17:30:58 -0800 (PST) Received: from MBP-von-Marvin.citadel.scalie.me (84-112-104-25.cable.dynamic.surfer.at. [84.112.104.25]) by smtp.gmail.com with ESMTPSA id jo9-20020a170906f6c900b0078b1ff41f05sm1011498ejb.43.2022.11.24.17.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 17:30:58 -0800 (PST) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Nov 2022 02:30:24 +0100 Message-Id: <20221125013046.40904-10-epirat07@gmail.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20221125013046.40904-1-epirat07@gmail.com> References: <20221125013046.40904-1-epirat07@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/31] avfilter/vf_coreimage: use av_dict_iterate 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: Marvin Scholz Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /k8AIVR+QjAT --- libavfilter/vf_coreimage.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index 874bdc8c56..b1959861de 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -416,8 +416,8 @@ static void set_option(CoreImageContext *ctx, CIFilter *filter, const char *key, // set user options if (filter_options) { - AVDictionaryEntry *o = NULL; - while ((o = av_dict_get(filter_options, "", o, AV_DICT_IGNORE_SUFFIX))) { + const AVDictionaryEntry *o = NULL; + while ((o = av_dict_iterate(filter_options, o))) { set_option(ctx, filter, o->key, o->value); } } @@ -427,10 +427,10 @@ static void set_option(CoreImageContext *ctx, CIFilter *filter, const char *key, static av_cold int init(AVFilterContext *fctx) { - CoreImageContext *ctx = fctx->priv; - AVDictionary *filter_dict = NULL; - AVDictionaryEntry *f = NULL; - AVDictionaryEntry *o = NULL; + CoreImageContext *ctx = fctx->priv; + AVDictionary *filter_dict = NULL; + const AVDictionaryEntry *f = NULL; + const AVDictionaryEntry *o = NULL; int ret; int i; @@ -460,7 +460,7 @@ static av_cold int init(AVFilterContext *fctx) // parse filters for option key-value pairs (opt=val@opt2=val2) separated by @ i = 0; - while ((f = av_dict_get(filter_dict, "", f, AV_DICT_IGNORE_SUFFIX))) { + while ((f = av_dict_iterate(filter_dict, f))) { AVDictionary *filter_options = NULL; if (strncmp(f->value, "default", 7)) { // not default @@ -477,7 +477,7 @@ static av_cold int init(AVFilterContext *fctx) if (!filter_options) { av_log(ctx, AV_LOG_DEBUG, "\tusing default options\n"); } else { - while ((o = av_dict_get(filter_options, "", o, AV_DICT_IGNORE_SUFFIX))) { + while ((o = av_dict_iterate(filter_options, o))) { av_log(ctx, AV_LOG_DEBUG, "\t%s: %s\n", o->key, o->value); } }