]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/dict.c
pixdesc: Drop unneeded deprecation warning guards
[ffmpeg] / libavutil / dict.c
index 7f4832092a13e1306368fe224f9c97b5a30f48d1..7213bf2519f520572dfcbcc2abb34de6e35f3f7d 100644 (file)
@@ -186,10 +186,15 @@ void av_dict_free(AVDictionary **pm)
     av_freep(pm);
 }
 
-void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
+int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
 {
     AVDictionaryEntry *t = NULL;
 
-    while ((t = av_dict_get(src, "", t, AV_DICT_IGNORE_SUFFIX)))
-        av_dict_set(dst, t->key, t->value, flags);
+    while ((t = av_dict_get(src, "", t, AV_DICT_IGNORE_SUFFIX))) {
+        int ret = av_dict_set(dst, t->key, t->value, flags);
+        if (ret < 0)
+            return ret;
+    }
+
+    return 0;
 }