Revision 383b25fd libavformat/metadata_compat.c

View differences:

libavformat/metadata_compat.c
108 108

  
109 109

  
110 110
#define FILL_METADATA(s, key, value) {                                        \
111
    if (value && *value && !av_metadata_get(s->metadata, #key, NULL, 0))      \
111
    if (!av_metadata_get(s->metadata, #key, NULL, 0))                         \
112 112
        av_metadata_set2(&s->metadata, #key, value, 0);                       \
113 113
    }
114
#define FILL_METADATA_STR(s, key)  FILL_METADATA(s, key, s->key)
114
#define FILL_METADATA_STR(s, key) {                                           \
115
    if (s->key && *s->key)  FILL_METADATA(s, key, s->key); }
115 116
#define FILL_METADATA_INT(s, key) {                                           \
116 117
    char number[10];                                                          \
117 118
    snprintf(number, sizeof(number), "%d", s->key);                           \

Also available in: Unified diff