diff mbox series

[FFmpeg-devel,v2,19/31] avformat/flvenc: use av_dict_iterate

Message ID 20221126144648.73162-20-epirat07@gmail.com
State New
Headers show
Series Use av_dict_iterate where approproate | expand

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. 26, 2022, 2:46 p.m. UTC
---
 libavformat/flvenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 59be11eba8..128ae8ebc0 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -277,7 +277,7 @@  static void write_metadata(AVFormatContext *s, unsigned int ts)
     int write_duration_filesize = !(flv->flags & FLV_NO_DURATION_FILESIZE);
     int metadata_count = 0;
     int64_t metadata_count_pos;
-    AVDictionaryEntry *tag = NULL;
+    const AVDictionaryEntry *tag = NULL;
 
     /* write meta_tag */
     avio_w8(pb, FLV_TAG_TYPE_META);            // tag type META
@@ -353,7 +353,7 @@  static void write_metadata(AVFormatContext *s, unsigned int ts)
     }
 
     ff_standardize_creation_time(s);
-    while ((tag = av_dict_get(s->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) {
+    while ((tag = av_dict_iterate(s->metadata, tag))) {
         if(   !strcmp(tag->key, "width")
             ||!strcmp(tag->key, "height")
             ||!strcmp(tag->key, "videodatarate")