aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/textdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-29 00:04:44 +0100
committerClément Bœsch <ubitux@gmail.com>2012-12-31 00:01:58 +0100
commitfaa94061dd7236cbaabd483e7b2df148cdbefb7f (patch)
tree350748d569b55a6cd312a494f6d1bfbe81708cc5 /libavcodec/textdec.c
parent7b43402724b21cca805c8afac6ec33a211d52b85 (diff)
downloadffmpeg-faa94061dd7236cbaabd483e7b2df148cdbefb7f.tar.gz
Add SubViewer v1 subtitles demuxer and decoder.
Diffstat (limited to 'libavcodec/textdec.c')
-rw-r--r--libavcodec/textdec.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/textdec.c b/libavcodec/textdec.c
index 32af644150..9b97bacabd 100644
--- a/libavcodec/textdec.c
+++ b/libavcodec/textdec.c
@@ -128,7 +128,7 @@ AVCodec ff_text_decoder = {
};
#endif
-#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER
+#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_TEXT_DECODER
static int linebreak_init(AVCodecContext *avctx)
{
@@ -169,4 +169,20 @@ AVCodec ff_pjs_decoder = {
};
#endif
+#if CONFIG_SUBVIEWER1_DECODER
+#define subviewer1_options options
+DECLARE_CLASS(subviewer1);
+
+AVCodec ff_subviewer1_decoder = {
+ .name = "subviewer1",
+ .priv_data_size = sizeof(TextContext),
+ .long_name = NULL_IF_CONFIG_SMALL("SubViewer1 subtitle"),
+ .type = AVMEDIA_TYPE_SUBTITLE,
+ .id = AV_CODEC_ID_SUBVIEWER1,
+ .decode = text_decode_frame,
+ .init = linebreak_init,
+ .priv_class = &subviewer1_decoder_class,
+};
+#endif
+
#endif /* text subtitles with '|' line break */