avformat/smjpegenc: use av_dict_iterate

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Marvin Scholz 2022-11-26 15:46:23 +01:00 committed by Andreas Rheinhardt
parent 3000cf7a57
commit f8584c13f0
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ typedef struct SMJPEGMuxContext {
static int smjpeg_write_header(AVFormatContext *s) static int smjpeg_write_header(AVFormatContext *s)
{ {
AVDictionaryEntry *t = NULL; const AVDictionaryEntry *t = NULL;
AVIOContext *pb = s->pb; AVIOContext *pb = s->pb;
int n, tag; int n, tag;
@ -48,7 +48,7 @@ static int smjpeg_write_header(AVFormatContext *s)
avio_wb32(pb, 0); avio_wb32(pb, 0);
ff_standardize_creation_time(s); 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_wl32(pb, SMJPEG_TXT);
avio_wb32(pb, strlen(t->key) + strlen(t->value) + 3); avio_wb32(pb, strlen(t->key) + strlen(t->value) + 3);
avio_write(pb, t->key, strlen(t->key)); avio_write(pb, t->key, strlen(t->key));