Revision 094d9df7 libavformat/metadata.c

View differences:

libavformat/metadata.c
74 74
    return 0;
75 75
}
76 76

  
77
void av_metadata_free(AVMetadata **pm)
78
{
79
    AVMetadata *m= *pm;
80

  
81
    if(m){
82
        while(m->count--){
83
            av_free(m->elems[m->count].key);
84
            av_free(m->elems[m->count].value);
85
        }
86
        av_free(m->elems);
87
    }
88
    av_freep(pm);
89
}
90

  
77 91
#if LIBAVFORMAT_VERSION_MAJOR < 53
78 92
#define FILL_METADATA(s, key, value) {                                        \
79 93
    if (value && *value &&                                                    \

Also available in: Unified diff