From patchwork Tue Jun 4 05:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 13399 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 61E40446FA3 for ; Tue, 4 Jun 2019 08:46:22 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4870A680BCF; Tue, 4 Jun 2019 08:46:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29C25680A03 for ; Tue, 4 Jun 2019 08:46:15 +0300 (EEST) Received: by mail-pf1-f180.google.com with SMTP id a23so11994190pff.4 for ; Mon, 03 Jun 2019 22:46:15 -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=PETuJfCwx1pahbhx0bsEDXG1VYxPVSw2gqo54dD0ZMo=; b=A7Ur1lljnZ9t0+riNtC7HONy8GjQNptDI2fFL39ISQnE9K0VYvc7060pXx9OOgrYik bsdWD9+hSj4+lFYeR4NVfuAplP8lQV4Mn7EmdbUZwpReVnGTDmeuhkG1Hf0EsolwM+u/ A+O02NpRfmJu8otrK27iqtio/iGQY99WQTSw9ARYBNJJmAY9Taa6p+PD0++swFz/c0tF J8kwUzqCGHJXDwb+6c7CFUIjHxhVfAURTiF9irit5fENolNWeqXOaXILJAzeRepwCCNZ mijoyn6ZHARGkV/VY89laYrPT9pxANs8kwbQg85mm8x4zk7o/7ZQnNCgPOIyYc6EQjya 1ODg== 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=PETuJfCwx1pahbhx0bsEDXG1VYxPVSw2gqo54dD0ZMo=; b=CdIEv4sUwnsNwtJ/+MxKW+MncScgFdDqF6Db6/2tGbciLB+rSWWmcB9OgpvmmRKDkr jRwh0uD6QfoHYwRJOwBMxI0r/yjCNLsrJmKYuAojcj7IQ2jCGe7LWvPkIJwcKVu78Ccm xaz88sWTLy6G8JG3x3n5/U5j0Ajin/g6pX7CNxWCuljzlJPf8DKZ+OpfFWvjgfwPOm45 uIJKeIgKjJTLqkPL39iZLxJS2TSvWEGSCtvqCbqczJMl/LD/AY/SrLCFJKSkkPX3S9zn IcuEJBMWfzPAOo7wi9M5ypAiAbE/Z7kPud1C2slzcl1ddL+RafEOo20lm9ISE3n0K3Kt XdFQ== X-Gm-Message-State: APjAAAUvHcd5tbPfV4UivOwzQ4UANi10wsmr811o4FkzmXEOkAEm5DJJ VwCKtruP7ePDSDQSG0KhurpFSnNW X-Google-Smtp-Source: APXvYqwkQjSaVR2kNS5z4NvdZqJubADrAeMsNpk7ofJmBPBKFBwNLqGXyHDmkjedN2I8bfaoWs/7Bg== X-Received: by 2002:a17:90a:de08:: with SMTP id m8mr34767830pjv.18.1559626735408; Mon, 03 Jun 2019 22:38:55 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id d10sm18180854pgh.43.2019.06.03.22.38.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 22:38:54 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Tue, 4 Jun 2019 13:38:42 +0800 Message-Id: <1559626724-16376-3-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1559626724-16376-1-git-send-email-mypopydev@gmail.com> References: <1559626724-16376-1-git-send-email-mypopydev@gmail.com> Subject: [FFmpeg-devel] [PATCH V1 3/5] lavc/webvttdec: fix ffmpeg -h full can't display webvtt decoder 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 decoder Signed-off-by: Jun Zhao --- libavcodec/webvttdec.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/libavcodec/webvttdec.c b/libavcodec/webvttdec.c index 7b2d175..28113f6 100644 --- a/libavcodec/webvttdec.c +++ b/libavcodec/webvttdec.c @@ -28,6 +28,7 @@ #include "avcodec.h" #include "ass.h" #include "libavutil/bprint.h" +#include "libavutil/opt.h" static const struct { const char *from; @@ -98,6 +99,17 @@ static int webvtt_decode_frame(AVCodecContext *avctx, return avpkt->size; } +static const AVOption options[] = { + { NULL }, +}; + +static const AVClass webvtt_decoder_class = { + .class_name = "WebVTT decoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_webvtt_decoder = { .name = "webvtt", .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), @@ -107,4 +119,5 @@ AVCodec ff_webvtt_decoder = { .init = ff_ass_subtitle_header_default, .flush = ff_ass_decoder_flush, .priv_data_size = sizeof(FFASSDecoderContext), + .priv_class = &webvtt_decoder_class, };