From patchwork Fri Sep 8 15:59:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Janatra X-Patchwork-Id: 5055 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.36.26 with SMTP id f26csp424234jaa; Fri, 8 Sep 2017 09:00:37 -0700 (PDT) X-Received: by 10.223.143.110 with SMTP id p101mr2336143wrb.182.1504886437157; Fri, 08 Sep 2017 09:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504886437; cv=none; d=google.com; s=arc-20160816; b=0Kd9v8lQVI2Y3GSlsdWXLDteZT4d23ykUNyhLBgY7v6xnn6xAX5sIRydoDQ9f+3JRW H0GWCc6WC0nQzlMEz+Xj7nsd81+5bv6PdeuGC6uQ721fC5v6Y4fveKYz4ppyeVNsNElM 3oOz8ysSrXioacEdsMY9YV1n3WOYkqBu/owa+9GnC4YkUjfbsreLCQkw/wvDFPzqQDjZ IuXfgQhnYU3q1MGFeQyYhl1J5e8PKIO6m6qsWNE35ypIJ3RJChC1cSBbT0p/q70Aj1Ih ltawY9u589KmBo9pVFN3vflhPcg3ptkXeGFInsWqfhlAe/BKs6gWrcCGPuKQxXrS/1NU yUBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=wuYkMnekSsyIqSvKvHyutuKKuyKyY811fIFfdsBXqc8=; b=hF7jLCVfh47yqJqLG26FsXQU545b0ns3klGO4dqR+i/4pyuWcfR+fJY8Z/P4B30BBi iw5UhGNPgzJxJ8KfpByBajmK7ilZWF/BGeHSPos1pp2jFu2KtMKShcCV5rAlKlzf0gKy lQ+O8yl5I0+50YHS0BAVC1waZXK5c9zc3v0k+lNGM2O86NGeVuiEfjuzyzwaZ6uZmn0K pL3GLgEWZILHn3S2blHShIQ66y5tdjZ+Y9/ZbU3Ns8euZhRqdooy8nKgX35fRpFi7TRX pTfaSf+d0R60CCIuEfxVwE5+Snk7sZbxnt9/NYpJwvrKqXD0h1E/w1KGLtM+hhV8XLop fC/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=ZyiKFglV; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f21si1670256wmd.185.2017.09.08.09.00.35; Fri, 08 Sep 2017 09:00: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; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=ZyiKFglV; 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 C7D92689CF7; Fri, 8 Sep 2017 19:00:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A8F05689CB2 for ; Fri, 8 Sep 2017 19:00:24 +0300 (EEST) Received: by mail-pf0-f181.google.com with SMTP id y29so4397147pff.0 for ; Fri, 08 Sep 2017 09:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hMtLq0uWgJlJ7qCJpNLsQHCmoFYgMF4xqoT1UgRnbWo=; b=ZyiKFglVhgjD7O8ZlQWjWES6v+Gplf764xvwVyRD1hau/BpnDWOClpjPSUHnxwwACK ifXx8h4uhbNCj/OFKjtiIGBLSiBQ1PX/8yjjY/pXeJzkXULWcUmRhL3POiz7stCfSZzk D4QzTKyFfq4yV20z+T8HaEXYQqHPDeKHtS7m/DV0L3n9qhOtFN+LFe7NM0sYYaUTJggB D6aaphg3siUJewDz7xt5XLTgSbLroEvc8vJsqnaaJUIqF4e5ixB6inbTB4msL1+gucKT h35G9YvCy0GepkcHHWUZbsD0HtbqAmjUZ1TCr3m/SiIKBQQgB1tGGqMZrqb1vscFHMCT puXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hMtLq0uWgJlJ7qCJpNLsQHCmoFYgMF4xqoT1UgRnbWo=; b=RALm1sn1q1eJ986nRKhTdyZVXhije/hOZ+Xr7jnrBkU80NddmU+kmNFL0zBGlgYaCu v45YdjC2bpYZQegyNU8Y4h/vT2TjLXvd87Mx7HX569X1A0hieI/BDgrNdvxuNQGnvFsh oo1WfKOaPLhaVAzNuRJMwLDkbPFye+9N8rJjj+Bb5AbNlo6wmXo8PJ4D2KYX4IwebNkG YN9FnbP9v7tpIp+VkVnPcWCS3f88odaQUxgQsn7BzIaiFF2z3Attfhy6gJwXSHV7Mdv4 w6CDit3wXpUtgGcDZ8HWExTKDUi6qoQOdh8cwphbQzjMUIh5s6g8GxHOM0qEBIVNY6fQ ln+Q== X-Gm-Message-State: AHPjjUja40hskttKG4pTRLN3dP0dOD7HyL54hqWE88SCsawwDZxAMPL+ KcDP0AnWl1ZqF0OTypVxkw== X-Google-Smtp-Source: ADKCNb4H0YqSVPGapyPupxM+2aVeSREqUkIePMKp+V39Ajigym2jgLK0XOAJljnd45bQnh1hILVXAA== X-Received: by 10.84.132.111 with SMTP id 102mr3973964ple.348.1504886425204; Fri, 08 Sep 2017 09:00:25 -0700 (PDT) Received: from janatra0.mtv.corp.google.com ([100.98.24.66]) by smtp.gmail.com with ESMTPSA id e19sm4842551pfl.146.2017.09.08.09.00.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Sep 2017 09:00:24 -0700 (PDT) From: Ivan Janatra To: ffmpeg-devel@ffmpeg.org Date: Fri, 8 Sep 2017 08:59:57 -0700 Message-Id: <20170908155957.95147-1-janatra@google.com> X-Mailer: git-send-email 2.14.1.581.gf28d330327-goog Subject: [FFmpeg-devel] [PATCH] libavformat/matroskaenc.c: Write Tags element for WebM 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 Cc: Ivan Janatra MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is already supported per https://www.webmproject.org/docs/container/#Tags and https://github.com/nbirkbeck/matroska-specification/commit/28a54f991f118fff31fe6bfe256c2dfab46d00e5 Signed-off-by: Ivan Janatra --- libavformat/matroskaenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 9cc7be352e..5b70fead87 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1988,12 +1988,12 @@ static int mkv_write_header(AVFormatContext *s) ret = mkv_write_attachments(s); if (ret < 0) goto fail; - - ret = mkv_write_tags(s); - if (ret < 0) - goto fail; } + ret = mkv_write_tags(s); + if (ret < 0) + goto fail; + if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL) && !mkv->is_live) mkv_write_seekhead(pb, mkv);