History

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

Anton Khirnov committed 16 years ago

Commit 3dd61801 parent 0950e173 files · +7 −1Browse files

Unified · Split

3 files
  1. doc/APIchanges +4 −0
  2. libavformat/avformat.h +1 −1
  3. libavformat/metadata.c +2 −0
doc/APIchanges+4−0
@@ -12,6 +12,10 @@ libavutil: 2009-03-08 · 11 unmodified lines
1212
1313 API changes, most recent first:
1414
15+2010-04-01 - rxxxxx - lavf 52.61.0 - metadata API
16+ Add a flag for av_metadata_set2() to disable overwriting of
17+ existing tags.
18+
1519 2010-04-01 - r22753 - lavc 52.66.0
1620 Add avcodec_get_edge_width()
1721
libavformat/avformat.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #define AVFORMAT_AVFORMAT_H
2323
2424 #define LIBAVFORMAT_VERSION_MAJOR 52
25−#define LIBAVFORMAT_VERSION_MINOR 60
25+#define LIBAVFORMAT_VERSION_MINOR 61
2626 #define LIBAVFORMAT_VERSION_MICRO 0
2727
2828 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
libavformat/metadata.c+2−0
@@ -55,6 +55,8 @@ int av_metadata_set2(AVMetadata **pm, const char *key, const char *value, int fl · 54 unmodified lines
5555 m=*pm= av_mallocz(sizeof(*m));
5656
5757 if(tag){
58+ if (flags & AV_METADATA_DONT_OVERWRITE)
59+ return 0;
5860 av_free(tag->value);
5961 av_free(tag->key);
6062 *tag= m->elems[--m->count];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t