Merge commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Mar 2014 11:44:09 +0000 (12:44 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Mar 2014 11:44:09 +0000 (12:44 +0100)
* commit '93d216d37a3f95190ecb9d51cf72f54ea4e04ec7':
  dict: K&R formatting cosmetics

Conflicts:
libavutil/dict.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavutil/dict.c

@@@ -85,21 -93,18 +93,21 @@@ int av_dict_set(AVDictionary **pm, cons
              return AVERROR(ENOMEM);
      }
      if (value) {
-         if (flags & AV_DICT_DONT_STRDUP_KEY) {
+         if (flags & AV_DICT_DONT_STRDUP_KEY)
 -            m->elems[m->count].key = key;
 +            m->elems[m->count].key = (char*)(intptr_t)key;
-         else
+         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)))
 +            char *newval = av_mallocz(len);
 +            if (!newval)
                  return AVERROR(ENOMEM);
 -            av_strlcat(oldval, value, len);
 -            m->elems[m->count].value = oldval;
 +            av_strlcat(newval, oldval, len);
 +            av_freep(&oldval);
 +            av_strlcat(newval, value, len);
 +            m->elems[m->count].value = newval;
          } else
              m->elems[m->count].value = av_strdup(value);
          m->count++;