[FFmpeg-cvslog] avformat/movenc: use av_dict_iterate

Marvin Scholz git at videolan.org
Thu Dec 1 12:39:37 EET 2022


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Nov 26 15:46:34 2022 +0100| [562d19b5031f23d0d029185b2cbd8ff02a31a7b6] | committer: Andreas Rheinhardt

avformat/movenc: use av_dict_iterate

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=562d19b5031f23d0d029185b2cbd8ff02a31a7b6
---

 libavformat/movenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 064b541972..7b00e65cdd 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4110,7 +4110,7 @@ static int mov_write_mdta_hdlr_tag(AVIOContext *pb, MOVMuxContext *mov,
 static int mov_write_mdta_keys_tag(AVIOContext *pb, MOVMuxContext *mov,
                                    AVFormatContext *s)
 {
-    AVDictionaryEntry *t = NULL;
+    const AVDictionaryEntry *t = NULL;
     int64_t pos = avio_tell(pb);
     int64_t curpos, entry_pos;
     int count = 0;
@@ -4121,7 +4121,7 @@ static int mov_write_mdta_keys_tag(AVIOContext *pb, MOVMuxContext *mov,
     entry_pos = avio_tell(pb);
     avio_wb32(pb, 0); /* entry count */
 
-    while (t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX)) {
+    while (t = av_dict_iterate(s->metadata, t)) {
         size_t key_len = strlen(t->key);
         avio_wb32(pb, key_len + 8);
         ffio_wfourcc(pb, "mdta");
@@ -4139,14 +4139,14 @@ static int mov_write_mdta_keys_tag(AVIOContext *pb, MOVMuxContext *mov,
 static int mov_write_mdta_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
                                    AVFormatContext *s)
 {
-    AVDictionaryEntry *t = NULL;
+    const AVDictionaryEntry *t = NULL;
     int64_t pos = avio_tell(pb);
     int count = 1; /* keys are 1-index based */
 
     avio_wb32(pb, 0); /* size */
     ffio_wfourcc(pb, "ilst");
 
-    while (t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX)) {
+    while (t = av_dict_iterate(s->metadata, t)) {
         int64_t entry_pos = avio_tell(pb);
         avio_wb32(pb, 0); /* size */
         avio_wb32(pb, count); /* key */



More information about the ffmpeg-cvslog mailing list