[FFmpeg-devel] [PATCH] matroskaenc: don't duplicate title information

Anton Khirnov anton
Mon Nov 22 09:24:39 CET 2010


Title is already written into special fields designated for it --
per-segment Title, per-chapter ChapString and per-stream Name (yay for
consistent naming). Therefore, don't duplicate it in Tags.
---
 libavformat/matroskaenc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 1430228..598c253 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -742,7 +742,8 @@ static int mkv_write_tag(AVFormatContext *s, AVMetadata *m, unsigned int element
     end_ebml_master(s->pb, targets);
 
     while ((t = av_metadata_get(m, "", t, AV_METADATA_IGNORE_SUFFIX)))
-        mkv_write_simpletag(s->pb, t);
+        if (strcmp(t->key, "title"))
+            mkv_write_simpletag(s->pb, t);
 
     end_ebml_master(s->pb, tag);
     return 0;
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list