From patchwork Thu Jun 6 02:07:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 13425 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 841844496D5 for ; Thu, 6 Jun 2019 05:07:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6A4EB68A690; Thu, 6 Jun 2019 05:07:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EDD7468A569 for ; Thu, 6 Jun 2019 05:07:38 +0300 (EEST) Received: by mail-pg1-f172.google.com with SMTP id 20so399036pgr.4 for ; Wed, 05 Jun 2019 19:07:38 -0700 (PDT) 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; bh=BVy1kPhycRb8RRM20M2KuRaSCTrqkDWkeXe0rniqO6k=; b=V9NRDZ4PbB8ztCLYMYXADrYya5kHfou8uuteCUXU89crsXZEiomD1aGIgafthmJ9W1 rLI84Ho8MjbvtI5FJ45A9EYuU/m2mgmiJMsXYhyjFqu6bb5+QuqA+Hq89CBFifffOtNQ rrAfZUjHJirj9muBrIDvVmzxotNhm5+gbNlMxsif+xLpyz8Z/rIPNEHqQkMtQjTqniUN dtM+60nQRknTZ48FTVo484FG4eOXorZEKkZGYK7NZV5PpnRt5W/DBpw8JLCuipBmt+uo vnKAHvvfgWPKOqddpJ9BSm958jwbnG0uxcvrSMptYn2DinT79ZySZ2krJ0F890lBg0v1 gx/A== 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; bh=BVy1kPhycRb8RRM20M2KuRaSCTrqkDWkeXe0rniqO6k=; b=MtxVbNrn0CB+k5dvZBq6P8CLfOvGVgDbmSNPwVdbtq619v4g7W5ZRiKG1lYI+Dnncf 1P++fv4CsjgB28VUnvoqbyn3Hrj0y/7gmYveJoqoRvp/flIFdFKobOQaiIOdk5YZDvam 6ePFiFElpw+ugayUDFCf/UglvQ7hCRj1ZflI6HFjHh43nBlfmUn+lyD5Hk+2NdGOh7qB rSBiXIG5pjRiwu4bQDTASmqRRnIPZWAmtyHP4gMtsqUkAsxsJ1xJZmeY3mZodRJjD2ov 70Miv9o16BuDIjOqMJNSc4Y1DJWW9xLivhDUoBAeS/sXsKy4uFrclg+frhHs9zIFNIkP 0IQA== X-Gm-Message-State: APjAAAVqW/6jc9qhnOIAmg8r769Ce7P2eA6tivdaPGGqKGYKikR9nn7J UoanjqU88355RW49IQaktd0Bpv61 X-Google-Smtp-Source: APXvYqyUmtpUxHfIctrtdzIyX3E1qpsQ21lvs3JrpZvpwoAS3T2NR9UsRei4Zqvx8E+0tv2Sdc1rwQ== X-Received: by 2002:a62:6241:: with SMTP id w62mr51339461pfb.226.1559786856943; Wed, 05 Jun 2019 19:07:36 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id m11sm233220pjv.21.2019.06.05.19.07.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 19:07:36 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Jun 2019 10:07:24 +0800 Message-Id: <1559786846-30859-3-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1559786846-30859-1-git-send-email-mypopydev@gmail.com> References: <1559786846-30859-1-git-send-email-mypopydev@gmail.com> Subject: [FFmpeg-devel] [PATCH V2 2/4] lavf/webvttenc: fix ffmpeg -h full can't display webvtt muxer 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: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao fix ffmpeg -h full can't display webvtt muxer Signed-off-by: Jun Zhao --- libavformat/webvttenc.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c index 61b7f54..b4e8a61 100644 --- a/libavformat/webvttenc.c +++ b/libavformat/webvttenc.c @@ -26,6 +26,7 @@ #include "avformat.h" #include "internal.h" +#include "libavutil/opt.h" static void webvtt_write_time(AVIOContext *pb, int64_t millisec) { @@ -94,6 +95,17 @@ static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt) return 0; } +static const AVOption options[] = { + { NULL } +}; + +static const AVClass webvtt_muxer_class = { + .class_name = "WebVTT muxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVOutputFormat ff_webvtt_muxer = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), @@ -103,4 +115,5 @@ AVOutputFormat ff_webvtt_muxer = { .subtitle_codec = AV_CODEC_ID_WEBVTT, .write_header = webvtt_write_header, .write_packet = webvtt_write_packet, + .priv_class = &webvtt_muxer_class, };