diff options
author | Anton Khirnov <wyskas@gmail.com> | 2010-06-04 07:32:09 +0000 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2010-06-04 07:32:09 +0000 |
commit | 795c6a6b1fbe1e8481160d5cabc56995500ee127 (patch) | |
tree | 8fb77dcab31b453e7ed980c88ea2f59f4c895bd4 | |
parent | 35d8ecc54eae48e73f707a1ce170b6cd43a022a6 (diff) | |
download | ffmpeg-795c6a6b1fbe1e8481160d5cabc56995500ee127.tar.gz |
metadata: make conversion to the same format a noop.
Patch by Anton Khirnov, wyskas at gmail
Originally committed as revision 23466 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/metadata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/metadata.c b/libavformat/metadata.c index ff7ffe9560..c590df9430 100644 --- a/libavformat/metadata.c +++ b/libavformat/metadata.c @@ -117,9 +117,11 @@ void metadata_conv(AVMetadata **pm, const AVMetadataConv *d_conv, AVMetadata *dst = NULL; const char *key; + if (d_conv == s_conv) + return; + while((mtag=av_metadata_get(*pm, "", mtag, AV_METADATA_IGNORE_SUFFIX))) { key = mtag->key; - if (s_conv != d_conv) { if (s_conv) for (sc=s_conv; sc->native; sc++) if (!strcasecmp(key, sc->native)) { @@ -132,7 +134,6 @@ void metadata_conv(AVMetadata **pm, const AVMetadataConv *d_conv, key = dc->native; break; } - } av_metadata_set2(&dst, key, mtag->value, 0); } av_metadata_free(pm); |