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 B92D244DEA for ; Fri, 25 Nov 2022 01:34:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 105FC68BC05; Fri, 25 Nov 2022 03:31:27 +0200 (EET) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0861068BB3A for ; Fri, 25 Nov 2022 03:31:11 +0200 (EET) Received: by mail-ej1-f47.google.com with SMTP id f18so7274391ejz.5 for ; Thu, 24 Nov 2022 17:31:11 -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=J0k9RFYKgvCUKvNX8n6/zI0IOHwDXnmysbxOEtWmSvD59EocdKx46JbIYYX28oxF6a Qujga45GqLecW6zrMBX9EZIMPbt5PoVuQq7I3hXP6b+fiv7J8JwNLpSYgBWv/jKX3D34 0QiL53o7i35+64I+snPnFBnzxU09IK8Wjik8P5Hv0PmdDe8lYQnOdIlCeBkxwPo/UFUm HhpSvptPIT+gqgy3JMwXntAyjAKDDXxTXhXG4ULVUraJIhCd7oTz2/8Y6g6SWe8H+qLm U3mYr0GUa67xak0JmnyEqvN8jfHIoQaUn/gcHusRH0sMOf7xMBoaF/px2pAiiQTUhpVI yo1Q== 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=Cut2++TN4DG0mhzaHUOWA6R+c7XcG2mIn9I1/FuQSwm5DJfAY/WCyWn6n1e2yQ6p04 fe42MBh5o+7ooIAOfqn53sEYiIlmbDqJnEhyjOti4swTqekBuvL0UXSNUq7i2z0O7uPT GdKw234ZFoP4Owp/5mG99xv4LRQ4gGIOs04zA1HeV3XmaCZLda1rctw/okfx8k9hAZrD Tt672ojhmsbJGY9Ic/bl9cBkWvhuv/2Apc7ETgiUjrvGJf2Zn90jCDnN+/LbDV/leJ5W o87XMW2YKv/WrGeydP+u2q9VN0ixp0O3/n4HmcpZJib3nH006/KMkuPrac3rLOSvM/F+ 3OCw== X-Gm-Message-State: ANoB5pnhIoaGeREr5qMuW46grzch0BlJWviqDoWdP0eNhmJcb4xSsMc6 h0Jl2FnzuvwpQDzJ2764sd0R/jCx8ko= X-Google-Smtp-Source: AA0mqf7gCgnQ3rWCescRUpJ/Z98RHWejSozVV+GChCyk0ydq6Pw/0kd3wshd+FkoerGyHaT93kuHBg== X-Received: by 2002:a17:906:cb90:b0:772:e95f:cdce with SMTP id mf16-20020a170906cb9000b00772e95fcdcemr30204808ejb.78.1669339871755; Thu, 24 Nov 2022 17:31:11 -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.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 17:31:11 -0800 (PST) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Nov 2022 02:30:40 +0100 Message-Id: <20221125013046.40904-26-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 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".