avutil/dict: Use av_dict_iterate in av_dict_copy

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Marvin Scholz 2022-09-24 16:36:57 +02:00 committed by Anton Khirnov
parent 5f7c5a0bd7
commit 3c2050b749
1 changed files with 2 additions and 2 deletions

View File

@ -236,9 +236,9 @@ void av_dict_free(AVDictionary **pm)
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
{
AVDictionaryEntry *t = NULL;
const AVDictionaryEntry *t = NULL;
while ((t = av_dict_get(src, "", t, AV_DICT_IGNORE_SUFFIX))) {
while ((t = av_dict_iterate(src, t))) {
int ret = av_dict_set(dst, t->key, t->value, flags);
if (ret < 0)
return ret;