[FFmpeg-cvslog] avformat/cafenc: use av_dict_iterate
Marvin Scholz
git at videolan.org
Thu Dec 1 12:39:33 EET 2022
ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Nov 26 15:46:32 2022 +0100| [401508b24b6c367e6ad8060fafa39659b71d9c07] | committer: Andreas Rheinhardt
avformat/cafenc: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=401508b24b6c367e6ad8060fafa39659b71d9c07
---
libavformat/cafenc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index b90811d46f..b8317cd5ed 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -113,7 +113,7 @@ static int caf_write_header(AVFormatContext *s)
AVIOContext *pb = s->pb;
AVCodecParameters *par = s->streams[0]->codecpar;
CAFContext *caf = s->priv_data;
- AVDictionaryEntry *t = NULL;
+ const AVDictionaryEntry *t = NULL;
unsigned int codec_tag = ff_codec_get_tag(ff_codec_caf_tags, par->codec_id);
int64_t chunk_size = 0;
int frame_size = par->frame_size, sample_rate = par->sample_rate;
@@ -195,13 +195,13 @@ static int caf_write_header(AVFormatContext *s)
ff_standardize_creation_time(s);
if (av_dict_count(s->metadata)) {
ffio_wfourcc(pb, "info"); //< Information chunk
- while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) {
+ while ((t = av_dict_iterate(s->metadata, t))) {
chunk_size += strlen(t->key) + strlen(t->value) + 2;
}
avio_wb64(pb, chunk_size + 4);
avio_wb32(pb, av_dict_count(s->metadata));
t = NULL;
- while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX))) {
+ while ((t = av_dict_iterate(s->metadata, t))) {
avio_put_str(pb, t->key);
avio_put_str(pb, t->value);
}
More information about the ffmpeg-cvslog
mailing list