From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 8095744E67 for ; Sat, 26 Nov 2022 14:50:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A8CD668BC9D; Sat, 26 Nov 2022 16:47:29 +0200 (EET) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DCB1268BB5D for ; Sat, 26 Nov 2022 16:47:15 +0200 (EET) Received: by mail-ed1-f52.google.com with SMTP id x102so9954889ede.0 for ; Sat, 26 Nov 2022 06:47:15 -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=usF8IYSm4A8E4G8ZBIFm+bYtC1XpOWWOV+xjiBQExXg=; b=OX3ILk517ZDSgFeEQxCurtopB0JGhy3VC6Ulv5W672WxGJ+O4KUAfeR1zdZR0H988o csiqnzjxcBtpkHIrqFlqSW+NLmzm7RKh783ooIcKUJ2lUljFYk8gh2g4dZOlJRSSshZo DpOjbZkkH6jAudqhdZ7HG0uaIhbOszgGCawt81dgMIdLqvGHXmHX01kr1z2DE3q4HXbj dT3wm75d1KYdQUjqB2nqVXuKocDhGepMxDMzGGIEy0nWBllKXfkZfA5E8mrXehjdlRxS YjrJyqD41QSDnr8iaF7gQ6/yuNMLKMlupL5Y4+JYM5clyRYXV6Rw4bUdhgujpPoHDxtp n9jQ== 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=usF8IYSm4A8E4G8ZBIFm+bYtC1XpOWWOV+xjiBQExXg=; b=VZATu9ex6I6M8YupvYJxlKGaMT6/2vLH1ggLbiMa0cdBTkdbX3+dI8zwW1vwA3ZI0+ 2m5JqIjvnM7ahVhK4w+3bQ4xU0nBDhSfvFoz8GXh3hQ0eOY9WWk9rbRMBCEEmbXnEPuY oXiHtf4uFyL+RIf7aPnxoz42bAHkPUpfXp28+EHu45VwxoR3YrE3y+nKrINIQZQ2ItLv JQN85vf7z5k/4kSc6Q7SF/0MRAP9ZrHCZrrrpf48wfDvGYWDjU0UjUD+dUEBw8TcAZqd 8kFX1FTrn6cTO1BcQO1CQnptuAB9s0MREWjQhPc01n1SasRchOeN+BoGrfxy9r7v9Wc9 tRaw== X-Gm-Message-State: ANoB5pmMBF71Z4C7fzRQct8mxwxpuWEQpP2OBqBq+pOidnsInzOswDgD E3SWH7yFvHDx4dTMMpyHHvtlvoNB5m0= X-Google-Smtp-Source: AA0mqf5IVrMYokyevsowc5F3Gly2xBdeNEJjABDjfqtyIRwoMCGuOkeDz/iySexzPi23TVsNx2OY5Q== X-Received: by 2002:aa7:c788:0:b0:458:b9f9:9fba with SMTP id n8-20020aa7c788000000b00458b9f99fbamr24007193eds.305.1669474035606; Sat, 26 Nov 2022 06:47:15 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Nov 2022 06:47:15 -0800 (PST) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Sat, 26 Nov 2022 15:46:42 +0100 Message-Id: <20221126144648.73162-26-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 25/31] avformat/id3v2enc: 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- libavformat/id3v2enc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/id3v2enc.c b/libavformat/id3v2enc.c index 515d2efd7d..ac907c2758 100644 --- a/libavformat/id3v2enc.c +++ b/libavformat/id3v2enc.c @@ -150,7 +150,7 @@ static int id3v2_put_priv(ID3v2EncContext *id3, AVIOContext *avioc, const char * return len + ID3v2_HEADER_SIZE; } -static int id3v2_check_write_tag(ID3v2EncContext *id3, AVIOContext *pb, AVDictionaryEntry *t, +static int id3v2_check_write_tag(ID3v2EncContext *id3, AVIOContext *pb, const AVDictionaryEntry *t, const char table[][4], enum ID3v2Encoding enc) { uint32_t tag; @@ -167,13 +167,13 @@ static int id3v2_check_write_tag(ID3v2EncContext *id3, AVIOContext *pb, AVDictio static void id3v2_3_metadata_split_date(AVDictionary **pm) { - AVDictionaryEntry *mtag = NULL; + const AVDictionaryEntry *mtag = NULL; AVDictionary *dst = NULL; const char *key, *value; char year[5] = {0}, day_month[5] = {0}; int i; - while ((mtag = av_dict_get(*pm, "", mtag, AV_DICT_IGNORE_SUFFIX))) { + while ((mtag = av_dict_iterate(*pm, mtag))) { key = mtag->key; if (!av_strcasecmp(key, "date")) { /* split date tag using "YYYY-MM-DD" format into year and month/day segments */ @@ -220,7 +220,7 @@ void ff_id3v2_start(ID3v2EncContext *id3, AVIOContext *pb, int id3v2_version, static int write_metadata(AVIOContext *pb, AVDictionary **metadata, ID3v2EncContext *id3, int enc) { - AVDictionaryEntry *t = NULL; + const AVDictionaryEntry *t = NULL; int ret; ff_metadata_conv(metadata, ff_id3v2_34_metadata_conv, NULL); @@ -229,7 +229,7 @@ static int write_metadata(AVIOContext *pb, AVDictionary **metadata, else if (id3->version == 4) ff_metadata_conv(metadata, ff_id3v2_4_metadata_conv, NULL); - while ((t = av_dict_get(*metadata, "", t, AV_DICT_IGNORE_SUFFIX))) { + while ((t = av_dict_iterate(*metadata, t))) { if ((ret = id3v2_check_write_tag(id3, pb, t, ff_id3v2_tags, enc)) > 0) { id3->len += ret; continue; -- 2.37.0 (Apple Git-136) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".