[FFmpeg-devel] [PATCH]lavf/matroskaenc: Do not write two CodecID elements for rawvideo

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Jan 10 18:23:04 EET 2017


Hi!

Attached patch fixes ticket #6068.

Please comment, Carl Eugen
-------------- next part --------------
From b100ef83e257d8a106eefa3d2da9463ccd0e87d8 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Tue, 10 Jan 2017 17:21:08 +0100
Subject: [PATCH] lavf/matroskaenc: Do not write two CodecID elements for
 rawvideo.

Fixes ticket #6068.
---
 libavformat/matroskaenc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 78a621e..7e97586 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1119,6 +1119,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
     } else {
         // look for a codec ID string specific to mkv to use,
         // if none are found, use AVI codes
+        if (par->codec_id != AV_CODEC_ID_RAWVIDEO || par->codec_tag)
         for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
             if (ff_mkv_codec_tags[j].id == par->codec_id) {
                 put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list