[FFmpeg-devel] [PATCH 03/13] lavc/srtdec: add support for configuring default style via AVOptions
rcombs
rcombs at rcombs.me
Sat Jan 25 04:01:50 EET 2020
---
libavcodec/srtdec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index ecc0801595..8d3b3cfc9e 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -85,6 +85,8 @@ static int srt_decode_frame(AVCodecContext *avctx,
return avpkt->size;
}
+ASS_GENERIC_CLASS(srt, SubRip)
+
#if CONFIG_SRT_DECODER
/* deprecated decoder */
AVCodec ff_srt_decoder = {
@@ -96,18 +98,22 @@ AVCodec ff_srt_decoder = {
.decode = srt_decode_frame,
.flush = ff_ass_decoder_flush,
.priv_data_size = sizeof(FFASSDecoderContext),
+ .priv_class = &srt_decoder_class,
};
#endif
+ASS_GENERIC_CLASS(subrip, SubRip)
+
#if CONFIG_SUBRIP_DECODER
AVCodec ff_subrip_decoder = {
.name = "subrip",
.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
.id = AV_CODEC_ID_SUBRIP,
- .init = ff_ass_subtitle_header_default,
+ .init = ff_ass_subtitle_header_options,
.decode = srt_decode_frame,
.flush = ff_ass_decoder_flush,
.priv_data_size = sizeof(FFASSDecoderContext),
+ .priv_class = &subrip_decoder_class,
};
#endif
--
2.24.1
More information about the ffmpeg-devel
mailing list