Commit 80ff350d authored by rbultje's avatar rbultje

Add a flag to not overwrite existing tags

Patch by Anton Khirnov <wyskas gmail com>.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22806 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 149a3eaf
......@@ -12,6 +12,10 @@ libavutil: 2009-03-08
API changes, most recent first:
2010-04-01 - rxxxxx - lavf 52.61.0 - metadata API
Add a flag for av_metadata_set2() to disable overwriting of
existing tags.
2010-04-01 - r22753 - lavc 52.66.0
Add avcodec_get_edge_width()
......
......@@ -22,7 +22,7 @@
#define AVFORMAT_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
#define LIBAVFORMAT_VERSION_MINOR 60
#define LIBAVFORMAT_VERSION_MINOR 61
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
......
......@@ -55,6 +55,8 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl
m=*pm= av_mallocz(sizeof(*m));
if(tag){
if (flags & AV_METADATA_DONT_OVERWRITE)
return 0;
av_free(tag->value);
av_free(tag->key);
*tag= m->elems[--m->count];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment