diff options
Diffstat (limited to 'libavformat/metadata.c')
-rw-r--r-- | libavformat/metadata.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/metadata.c b/libavformat/metadata.c index 5c7ef06199..70bfa3d35b 100644 --- a/libavformat/metadata.c +++ b/libavformat/metadata.c @@ -74,6 +74,20 @@ int av_metadata_set(AVMetadata **pm, AVMetadataTag elem) return 0; } +void av_metadata_free(AVMetadata **pm) +{ + AVMetadata *m= *pm; + + if(m){ + while(m->count--){ + av_free(m->elems[m->count].key); + av_free(m->elems[m->count].value); + } + av_free(m->elems); + } + av_freep(pm); +} + #if LIBAVFORMAT_VERSION_MAJOR < 53 #define FILL_METADATA(s, key, value) { \ if (value && *value && \ |