[FFmpeg-cvslog] r22806 - in trunk: doc/APIchanges libavformat/avformat.h libavformat/metadata.c

rbultje subversion
Mon Apr 5 21:46:55 CEST 2010


Author: rbultje
Date: Mon Apr  5 21:46:55 2010
New Revision: 22806

Log:
Add a flag to not overwrite existing tags

Patch by Anton Khirnov <wyskas gmail com>.

Modified:
   trunk/doc/APIchanges
   trunk/libavformat/avformat.h
   trunk/libavformat/metadata.c

Modified: trunk/doc/APIchanges
==============================================================================
--- trunk/doc/APIchanges	Mon Apr  5 19:26:06 2010	(r22805)
+++ trunk/doc/APIchanges	Mon Apr  5 21:46:55 2010	(r22806)
@@ -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()
 

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Mon Apr  5 19:26:06 2010	(r22805)
+++ trunk/libavformat/avformat.h	Mon Apr  5 21:46:55 2010	(r22806)
@@ -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, \

Modified: trunk/libavformat/metadata.c
==============================================================================
--- trunk/libavformat/metadata.c	Mon Apr  5 19:26:06 2010	(r22805)
+++ trunk/libavformat/metadata.c	Mon Apr  5 21:46:55 2010	(r22806)
@@ -55,6 +55,8 @@ int av_metadata_set2(AVMetadata **pm, co
         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];



More information about the ffmpeg-cvslog mailing list