avformat/metadata: use av_dict_iterate

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Marvin Scholz 2 years ago committed by Andreas Rheinhardt
parent 562d19b503
commit b7c577cec7
  1. 4
      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 /* TODO: use binary search to look up the two conversion tables
if the tables are getting big enough that it would matter speed wise */ if the tables are getting big enough that it would matter speed wise */
const AVMetadataConv *sc, *dc; const AVMetadataConv *sc, *dc;
AVDictionaryEntry *mtag = NULL; const AVDictionaryEntry *mtag = NULL;
AVDictionary *dst = NULL; AVDictionary *dst = NULL;
const char *key; const char *key;
if (d_conv == s_conv || !pm) if (d_conv == s_conv || !pm)
return; return;
while ((mtag = av_dict_get(*pm, "", mtag, AV_DICT_IGNORE_SUFFIX))) { while ((mtag = av_dict_iterate(*pm, mtag))) {
key = mtag->key; key = mtag->key;
if (s_conv) if (s_conv)
for (sc=s_conv; sc->native; sc++) for (sc=s_conv; sc->native; sc++)

Loading…
Cancel
Save