git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add a flag to not overwrite existing tags
[ffmpeg.git]
/
libavformat
/
metadata.c
diff --git
a/libavformat/metadata.c
b/libavformat/metadata.c
index
9ff7c48
..
0f2b529
100644
(file)
--- 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];