changeset 6082:140e0b5fcea2 libavformat

metadata: make conversion to the same format a noop. Patch by Anton Khirnov, wyskas at gmail
author mstorsjo
date Fri, 04 Jun 2010 07:32:09 +0000
parents d21ccbea3294
children 5ec1f78c30fe
files metadata.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/metadata.c	Fri Jun 04 06:42:39 2010 +0000
+++ b/metadata.c	Fri Jun 04 07:32:09 2010 +0000
@@ -117,9 +117,11 @@
     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 @@
                         key = dc->native;
                         break;
                     }
-        }
         av_metadata_set2(&dst, key, mtag->value, 0);
     }
     av_metadata_free(pm);