]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/dict.c
eamad: pass & check errors
[ffmpeg] / libavutil / dict.c
index 74301fbf11205a94f83c9b6a7c6a46f8d1141882..6177ddd3359340ff007a7fae7a62ba5d2fddd407 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <strings.h>
 #include "avstring.h"
 #include "dict.h"
 #include "internal.h"
@@ -75,11 +74,11 @@ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags
     }
     if (value) {
         if (flags & AV_DICT_DONT_STRDUP_KEY) {
-            m->elems[m->count].key  key;
+            m->elems[m->count].key   = (char*)(intptr_t)key;
         } else
         m->elems[m->count].key  = av_strdup(key  );
         if (flags & AV_DICT_DONT_STRDUP_VAL) {
-            m->elems[m->count].value = value;
+            m->elems[m->count].value = (char*)(intptr_t)value;
         } else if (oldval && flags & AV_DICT_APPEND) {
             int len = strlen(oldval) + strlen(value) + 1;
             if (!(oldval = av_realloc(oldval, len)))