1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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
This commit is contained in:
Anton Khirnov 2010-06-04 07:32:09 +00:00 committed by Martin Storsjö
parent 35d8ecc54e
commit 795c6a6b1f

View File

@ -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);