[FFmpeg-devel] [PATCH 2/8] metadata: make conversion to the same format a noop.

Anton Khirnov wyskas
Wed Jun 2 15:15:59 CEST 2010


---
 libavformat/metadata.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/metadata.c b/libavformat/metadata.c
index 30d1657..45ab052 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 && s_conv->conv_table)
                 for (sc=s_conv->conv_table; 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);
-- 
1.7.1




More information about the ffmpeg-devel mailing list