]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/textdec.c
Added STL demuxer and decoder
[ffmpeg] / libavcodec / textdec.c
index 611fcc8bf2beac1edadeaa4026f6b9335e5caf35..c9f02a2a4cbff70d1b79daf550a5cd0fdf2c33cb 100644 (file)
@@ -88,7 +88,7 @@ AVCodec ff_text_decoder = {
 };
 #endif
 
-#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER
+#if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER
 
 static int linebreak_init(AVCodecContext *avctx)
 {
@@ -113,6 +113,22 @@ AVCodec ff_vplayer_decoder = {
 };
 #endif
 
+#if CONFIG_STL_DECODER
+#define stl_options options
+DECLARE_CLASS(stl);
+
+AVCodec ff_stl_decoder = {
+    .name           = "stl",
+    .long_name      = NULL_IF_CONFIG_SMALL("Spruce subtitle format"),
+    .priv_data_size = sizeof(TextContext),
+    .type           = AVMEDIA_TYPE_SUBTITLE,
+    .id             = AV_CODEC_ID_STL,
+    .decode         = text_decode_frame,
+    .init           = linebreak_init,
+    .priv_class     = &stl_decoder_class,
+};
+#endif
+
 #if CONFIG_PJS_DECODER
 #define pjs_options options
 DECLARE_CLASS(pjs);