From patchwork Sat Nov 26 14:46:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 39543 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a05:6a11:561f:b0:33d:fc04:f431 with SMTP id rr31csp7374191pxb; Sat, 26 Nov 2022 06:48:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Zz8DwuVaHCrtvhVjzE2sLSq6HlPVM1pNkn+SSSHGaGpDWgXau62IK0B4MykC0nJmon6rs X-Received: by 2002:aa7:d417:0:b0:46b:203:f389 with SMTP id z23-20020aa7d417000000b0046b0203f389mr925249edq.303.1669474137274; Sat, 26 Nov 2022 06:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669474137; cv=none; d=google.com; s=arc-20160816; b=IoUzCqiHhA2IiGXMJ/+FtmKasxsiyBh0aGh71MbRFyrF3y3lyWO6h/R+xGZ4Lh89ss BgCiPpqdLkFlOSdjiMVmevxz3CYSYh4EmKr0Bh5m22EhAXUKMXZPP+iFl0iIr6jTwYWB 8YZ0dxEtbk8x/UARTBFFOyzUp7dZQZRcICxzQkqs5HcIApY2bz65eik9TgHM0OqtSEKX yG+FYReIRn1eJ/f45+zL+8kEHNRl8ZeF/ynYeSSix7Q6v4sVyxu0k3QWIrzh2VbbEH5a nxNutw7mzWw/vt9MdL8s+7Dwn1SKOJUStujUE5KDayzfYQnf0GyPGs+iFpxd4ciN5Z00 QG1g== 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=tz/yBcz7Jsgp4vZxvjEEYdiak3vY5EoU39Po9vW3UgleicDclX8BY2ga9s6+Jiy6wZ Aa4sWA25YDoGxplbOUQHCtEEIId2X14svRt3S0K1tgofyt1hwR6sWKgg9p6ZtJ83tHR7 vhH0ZcOBgAk/0BT7WkEh04pngDDUBdq7Ym0p7GV0Q3NKnumdr7+mxQ+5Qq2vqWDvkaAw t9qoY8Js3R6CH0Ui2LbtdDBay/hycxXcxsgfhi+YK7TrgDGs6L7SYHE39x7oA3Oylxt+ 0Lfo1auQr/zkhjseSe/0F802jYhS/MXq9fC8AjCQaXiLH3FJMlVU1EBUy5fGtbwP3LP0 7MZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=NtdMMSKp; 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 b7-20020a056402350700b0046351fa4ae2si5453728edd.99.2022.11.26.06.48.55; Sat, 26 Nov 2022 06:48:57 -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=NtdMMSKp; 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 81D4E68BB66; Sat, 26 Nov 2022 16:47:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1D5F68BB59 for ; Sat, 26 Nov 2022 16:47:04 +0200 (EET) Received: by mail-ed1-f41.google.com with SMTP id s12so9883883edd.5 for ; Sat, 26 Nov 2022 06:47:04 -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=NtdMMSKpaQ20DLi5yeIm51DIfjQT6Gf563C1fcRK7tAfw2c5co5D5nC9SQQxA7OWYa F0M7HHiWWf5TJi66mxEFo0pNUzeaOUsvXAMDjD2ehQuPiX16QYZ52S0k4QtDR+4hm8gS 2zH4Fhnyz4Sxp/euLViFH2rDyt40ZMKzsQvDCp2AoPjDPZQIdqFng2gp82s1eld9+x0I 2l1K3EL1Lz3yuI/8R2Cwcard4RNxfbN6vYEH82/NUuigPOHkBjjBFFtPmS/dCVw9gbfh a+QrEHdak8mP6vx/f8JMktrf5ZwF5xqJLpH7xVUSGrtD6VxtX2mGOmj/qgCDE2ilLhh2 lPzQ== 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=ZnDdAjhm1oqoE4hwlqaB6YEBYprZuaP/XVQA9MvS7QESJwS8DYXuR/mn3Yzq/JFiOf 6tNC0M8guvamQ8189EP+TntrfMLnb/a92EUWxxR4kVwsQ4wMw4Sxoc/yhasG4l1lB4A1 PIIlWZwhlQITsCaWR29tpIjU1RwitnzzZ/mGDMIPt9tbTbfImgDwjtASjYD7dTu0g+H3 fSqC6Y7CFkgqBINdKJRUdRdFJSq2T02ULUlXzJEn0MytLDaFgiMDn4308yNsVagcT5aB lyUzSpXrZ4c34g4H3J5Cb/WYoSTMu6mBrmiiMrYH+sf3QqQYrfC1/Js3xE/Qg1hPqZ6C ds8g== X-Gm-Message-State: ANoB5plWJuyd8gpVsJwZWvTqSGbIVKNUlYEpD6NB5QAINxPyyqYYyLbe 993zax2oG2FsJOctl5qh9ZCVfrsUkBo= X-Received: by 2002:a05:6402:294d:b0:467:6b55:3cf5 with SMTP id ed13-20020a056402294d00b004676b553cf5mr41037188edb.22.1669474024306; Sat, 26 Nov 2022 06:47:04 -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 ay10-20020a056402202a00b00461cdda400esm3107745edb.4.2022.11.26.06.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Nov 2022 06:47:03 -0800 (PST) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Sat, 26 Nov 2022 15:46:26 +0100 Message-Id: <20221126144648.73162-10-epirat07@gmail.com> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20221126144648.73162-1-epirat07@gmail.com> References: <20221125013046.40904-1-epirat07@gmail.com> <20221126144648.73162-1-epirat07@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: Il6eQENxkMNz Content-Length: 2456 --- 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); } }