[FFmpeg-devel] [PATCH V1 4/5] lavc/webvttenc: fix ffmpeg -h full can't display webvtt encoder
Jun Zhao
mypopydev at gmail.com
Tue Jun 4 08:38:43 EEST 2019
From: Jun Zhao <barryjzhao at tencent.com>
fix ffmpeg -h full can't display webvtt encoder
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
---
libavcodec/webvttenc.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c
index c84bbf4..c19040d 100644
--- a/libavcodec/webvttenc.c
+++ b/libavcodec/webvttenc.c
@@ -24,6 +24,7 @@
#include "avcodec.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
+#include "libavutil/opt.h"
#include "ass_split.h"
#include "ass.h"
@@ -224,6 +225,17 @@ static av_cold int webvtt_encode_init(AVCodecContext *avctx)
return s->ass_ctx ? 0 : AVERROR_INVALIDDATA;
}
+static const AVOption options[] = {
+ { NULL },
+};
+
+static const AVClass webvtt_encoder_class = {
+ .class_name = "WebVTT encoder",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
AVCodec ff_webvtt_encoder = {
.name = "webvtt",
.long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"),
@@ -233,4 +245,5 @@ AVCodec ff_webvtt_encoder = {
.init = webvtt_encode_init,
.encode_sub = webvtt_encode_frame,
.close = webvtt_encode_close,
+ .priv_class = &webvtt_encoder_class,
};
--
1.7.1
More information about the ffmpeg-devel
mailing list