diff mbox

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

Message ID 201701101723.04186.cehoyos@ag.or.at
State Superseded
Headers show

Commit Message

Carl Eugen Hoyos Jan. 10, 2017, 4:23 p.m. UTC
Hi!

Attached patch fixes ticket #6068.

Please comment, Carl Eugen
From b100ef83e257d8a106eefa3d2da9463ccd0e87d8 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@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 mbox

Patch

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);