diff mbox series

[FFmpeg-devel,v2,06/31] avformat/smjpegenc: use av_dict_iterate

Message ID 20221126144648.73162-7-epirat07@gmail.com
State Accepted
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/smjpegenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c
index 888ece2f7c..edba08cf9b 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpegenc.c
@@ -35,7 +35,7 @@  typedef struct SMJPEGMuxContext {
 
 static int smjpeg_write_header(AVFormatContext *s)
 {
-    AVDictionaryEntry *t = NULL;
+    const AVDictionaryEntry *t = NULL;
     AVIOContext *pb = s->pb;
     int n, tag;
 
@@ -48,7 +48,7 @@  static int smjpeg_write_header(AVFormatContext *s)
     avio_wb32(pb, 0);
 
     ff_standardize_creation_time(s);
-    while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) {
+    while ((t = av_dict_iterate(s->metadata, t))) {
         avio_wl32(pb, SMJPEG_TXT);
         avio_wb32(pb, strlen(t->key) + strlen(t->value) + 3);
         avio_write(pb, t->key, strlen(t->key));