From patchwork Wed Feb 17 10:13:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25701 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 214604493AF for ; Wed, 17 Feb 2021 12:22:19 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0659768A70F; Wed, 17 Feb 2021 12:22:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4BFA1680A2D for ; Wed, 17 Feb 2021 12:22:18 +0200 (EET) Received: by mail-wm1-f44.google.com with SMTP id x16so1610866wmk.3 for ; Wed, 17 Feb 2021 02:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=h7J6kgmw6EG3gPCytCGWIKwyIv6Ad4wH7/YQog+aOIE=; b=hZDbsQiFrxgVz8iXIlPWzwhzFEv8kVTr33Gn/JrzLyrEtFGQLblqzdT567rAY6R6wb d4deR05sElrEx7VjTfy8TK4ffP8sgL1YDVnD8BY6uILaxnBnYosyDois57T2H3Y7t2aj rFwfqkZsU8dfmAOAWlaDy6JdKU5aNZP3iS2oMUejdF2dEZ05KutJF3icEzDNqtluGv5+ 4LZIdfSmz/3En7Xllz9GPK93hcdTI39MmQCZUzaWVo1ETo/G2TRy+HFa0ufz2adaajYe /1QCB5i4MWA/WZZgo+/5ujrxW+PjdtUZs4HZ3u26iIwQx2ahmwhsIS8pgyroB8G8TKj2 GTQA== 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:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=h7J6kgmw6EG3gPCytCGWIKwyIv6Ad4wH7/YQog+aOIE=; b=IVtEbeZwIfKWD3buXIauPgdwWq4ZM4B0NEMh/YDj6K7yNMGy79pakumhIC+z8liB0f rkWzO0OKGBfYtD2cxWXdDJSOlOHYJEFvVuNLFgGx4VOscj72O+xpiTajUvn8cLoBCD7h l2v3bWrSWkzbElGSZu3O7pAxS+vTZAKm+1iQpQEawnVZWT3xdVMPIDW3/e9Hh1q8qa7m mWnqOC6NSklTWsgviaJXpeQriHy1msRnRBtlnA/WbE38cdOAxxUaFLGgjx7mX7ioHCZh TEcpsCOxQ2T+x/TF6yq8Fu0tL/zEBT/LZo9cZ3TioQ7tRy4lztocK9+iI6AKOMnHHbLz rmFw== X-Gm-Message-State: AOAM533b0JAELTLYpO0Kt6oizc1PuPgSzDCGFdjYik//T8vYzfhu5vHD +UQy5KQutzK5olA9KI4s7zyDjVGyNlw= X-Google-Smtp-Source: ABdhPJzsM4kvfHDWFRBv+Yu1ucHL6xV9o4St3umF2rps0AnYZwkVKAe7oXMnnst1EMxBMX040Ab8ug== X-Received: by 2002:a1c:7f46:: with SMTP id a67mr6067840wmd.94.1613556873452; Wed, 17 Feb 2021 02:14:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id v12sm3502828wrv.69.2021.02.17.02.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 02:14:33 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 17 Feb 2021 11:13:53 +0100 Message-Id: <20210217101356.1723370-16-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210217101356.1723370-1-andreas.rheinhardt@gmail.com> References: <20210217101356.1723370-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 16/19] avformat/matroskaenc: Add support for FlagTextDescriptions 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is the Matroska equivalent of D_WEBVTT_DESCRIPTIONS and is therefore only enabled for subtitles. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 86ffb51051..4242d7daef 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1364,6 +1364,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, av_log(s, AV_LOG_ERROR, "Subtitle codec %d is not supported.\n", par->codec_id); return AVERROR(ENOSYS); } + if (mkv->mode != MODE_WEBM && st->disposition & AV_DISPOSITION_DESCRIPTIONS) + put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGTEXTDESCRIPTIONS, 1); if (mkv->mode != MODE_WEBM || par->codec_id != AV_CODEC_ID_WEBVTT) native_id = MATROSKA_TRACK_TYPE_SUBTITLE;