diff mbox series

[FFmpeg-devel,v2,3/5] avutil/dict: Use av_dict_iterate in av_dict_copy

Message ID 20220924143659.74756-3-epirat07@gmail.com
State Accepted
Commit 3c2050b749d7813ec302106ef56129a9117c091c
Headers show
Series [FFmpeg-devel,v2,1/5] avutil/dict: Add av_dict_iterate | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Sept. 24, 2022, 2:36 p.m. UTC
---
 libavutil/dict.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/dict.c b/libavutil/dict.c
index ea03590d0f..3c05ed4c84 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -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;