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.

Originally committed as revision 16424 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2009-01-04 18:48:37 +00:00
parent 045cbba92d
commit 47146dfbf6
8 changed files with 200 additions and 23 deletions

View File

@@ -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 @@ void av_close_input_stream(AVFormatContext *s)
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);
}