OSDN Git Service

Don't overwrite user-supplied metadata with metadata mapped from an input file.
authorAnton Khirnov <wyskas@gmail.com>
Mon, 5 Apr 2010 19:53:25 +0000 (19:53 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 5 Apr 2010 19:53:25 +0000 (19:53 +0000)
Patch by Anton Khirnov <wyskas gmail com>.

Originally committed as revision 22808 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 5d88244..5e3f1d3 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2193,7 +2193,7 @@ static int av_transcode(AVFormatContext **output_files,
 
         mtag=NULL;
         while((mtag=av_metadata_get(in_file->metadata, "", mtag, AV_METADATA_IGNORE_SUFFIX)))
-            av_metadata_set(&out_file->metadata, mtag->key, mtag->value);
+            av_metadata_set2(&out_file->metadata, mtag->key, mtag->value, AV_METADATA_DONT_OVERWRITE);
         av_metadata_conv(out_file, out_file->oformat->metadata_conv,
                                     in_file->iformat->metadata_conv);
     }