diff options
author | Anton Khirnov <wyskas@gmail.com> | 2010-04-05 19:46:55 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-04-05 19:46:55 +0000 |
commit | 3dd6180fc7900b0b658e9175160dfe907784da5c (patch) | |
tree | ba5ce3020b4c13e73d6a0890535bc64cb0ee4f03 | |
parent | 0950e1703be141deccd3c1bc80d38145936b5f84 (diff) | |
download | ffmpeg-3dd6180fc7900b0b658e9175160dfe907784da5c.tar.gz |
Add a flag to not overwrite existing tags
Patch by Anton Khirnov <wyskas gmail com>.
Originally committed as revision 22806 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | doc/APIchanges | 4 | ||||
-rw-r--r-- | libavformat/avformat.h | 2 | ||||
-rw-r--r-- | libavformat/metadata.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 4a31c06e72..3e13466ab9 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -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() diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7c7affac07..eb5a965bce 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -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, \ diff --git a/libavformat/metadata.c b/libavformat/metadata.c index 9ff7c48a8a..0f2b5297b8 100644 --- a/libavformat/metadata.c +++ b/libavformat/metadata.c @@ -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]; |