diff utils.c @ 4149:1f857a4519bd libavformat

Generic metadata API. avi is updated as example. No version bump, the API still might change slightly ... No update to ffmpeg.c as requested by aurel.
author michael
date Sun, 04 Jan 2009 18:48:37 +0000
parents b3d75fa26b5c
children 2670c14e7b05
line wrap: on
line diff
--- a/utils.c	Sun Jan 04 16:23:18 2009 +0000
+++ b/utils.c	Sun Jan 04 18:48:37 2009 +0000
@@ -21,6 +21,7 @@
 #include "avformat.h"
 #include "internal.h"
 #include "libavcodec/opt.h"
+#include "libavcodec/metadata.h"
 #include "libavutil/avstring.h"
 #include "riff.h"
 #include <sys/time.h>
@@ -2305,6 +2306,14 @@
         av_free(s->chapters[s->nb_chapters]);
     }
     av_freep(&s->chapters);
+    if(s->meta_data){
+        while(s->meta_data->count--){
+            av_freep(&s->meta_data->elems[s->meta_data->count].key);
+            av_freep(&s->meta_data->elems[s->meta_data->count].value);
+        }
+        av_freep(&s->meta_data->elems);
+    }
+    av_freep(&s->meta_data);
     av_free(s);
 }