[FFmpeg-devel,18/31] avformat/metadata: use av_dict_iterate

Message ID 20221125013046.40904-19-epirat07@gmail.com
State Accepted
Headers
Series Use av_dict_iterate where approproate |

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Nov. 25, 2022, 1:30 a.m. UTC
---
 libavformat/metadata.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/libavformat/metadata.c b/libavformat/metadata.c
index b9b6de7972..a0258ea125 100644
--- a/libavformat/metadata.c
+++ b/libavformat/metadata.c
@@ -29,14 +29,14 @@  void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv,
     /* TODO: use binary search to look up the two conversion tables
        if the tables are getting big enough that it would matter speed wise */
     const AVMetadataConv *sc, *dc;
-    AVDictionaryEntry *mtag = NULL;
+    const AVDictionaryEntry *mtag = NULL;
     AVDictionary *dst = NULL;
     const char *key;
 
     if (d_conv == s_conv || !pm)
         return;
 
-    while ((mtag = av_dict_get(*pm, "", mtag, AV_DICT_IGNORE_SUFFIX))) {
+    while ((mtag = av_dict_iterate(*pm, mtag))) {
         key = mtag->key;
         if (s_conv)
             for (sc=s_conv; sc->native; sc++)