From patchwork Thu Sep 29 14:25:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 777 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp377023vsd; Thu, 29 Sep 2016 07:25:37 -0700 (PDT) X-Received: by 10.194.148.145 with SMTP id ts17mr1785137wjb.91.1475159137526; Thu, 29 Sep 2016 07:25:37 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v14si8995121wmv.75.2016.09.29.07.25.34; Thu, 29 Sep 2016 07:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 110BD689DD3; Thu, 29 Sep 2016 17:25:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-2.mx.upcmail.net (vie01a-dmta-pe01-2.mx.upcmail.net [62.179.121.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B02ED689ADB for ; Thu, 29 Sep 2016 17:25:13 +0300 (EEST) Received: from [172.31.216.44] (helo=vie01a-pemc-psmtp-pe02) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bpcH7-0002iw-55 for ffmpeg-devel@ffmpeg.org; Thu, 29 Sep 2016 16:25:25 +0200 Received: from [192.168.1.3] ([80.110.104.197]) by vie01a-pemc-psmtp-pe02 with SMTP @ mailcloud.upcmail.net id pSRP1t01N4FZ7ew01SRQxq; Thu, 29 Sep 2016 16:25:25 +0200 X-SourceIP: 80.110.104.197 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Thu, 29 Sep 2016 16:25:23 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201609291625.23693.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavf/matroskaenc: Always write V_QUICKTIME extradata. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch should fix ticket #5872. Please comment, Carl Eugen From 46e8d6919abdeb3d6153878fc815de9202b7eec1 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 29 Sep 2016 16:23:14 +0200 Subject: [PATCH] lavf/matroskaenc: Always write V_QUICKTIME extradata. Fixes ticket #5872. --- libavformat/matroskaenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 3eeb09b..f2896a5 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -683,9 +683,8 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, if (!par->codec_tag) par->codec_tag = ff_codec_get_tag(ff_codec_movvideo_tags, par->codec_id); - if (par->extradata_size) { if ( ff_codec_get_id(ff_codec_movvideo_tags, par->codec_tag) == par->codec_id - && ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(par->extradata + 4)) != par->codec_id + && (!par->extradata_size || ff_codec_get_id(ff_codec_movvideo_tags, AV_RL32(par->extradata + 4)) != par->codec_id) ) { int i; avio_wb32(dyn_cp, 0x5a + par->extradata_size); @@ -694,7 +693,6 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, avio_w8(dyn_cp, 0); } avio_write(dyn_cp, par->extradata, par->extradata_size); - } } else { if (!ff_codec_get_tag(ff_codec_bmp_tags, par->codec_id)) av_log(s, AV_LOG_WARNING, "codec %s is not supported by this format\n",