37 #define OFFSET(x) offsetof(TextContext, x)
38 #define SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
40 {
"keep_ass_markup",
"Set if ASS tags must be escaped",
OFFSET(keep_ass_markup),
AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags=
SD },
45 const char *p,
const char *p_end)
49 for (; p < p_end && *p; p++) {
66 }
else if (p[0] ==
'\n') {
70 }
else if (p[0] ==
'\r' && p < p_end - 1 && p[1] ==
'\n') {
89 const char *ptr = avpkt->
data;
91 const int ts_duration = avpkt->duration != -1 ?
95 if (ptr && avpkt->size > 0 && *ptr &&
103 *got_sub_ptr = sub->num_rects > 0;
108 #define DECLARE_CLASS(decname) static const AVClass decname ## _decoder_class = { \
109 .class_name = #decname " decoder", \
110 .item_name = av_default_item_name, \
111 .option = decname ## _options, \
112 .version = LIBAVUTIL_VERSION_INT, \
115 #if CONFIG_TEXT_DECODER
116 #define text_options options
127 .priv_class = &text_decoder_class,
131 #if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER
140 #if CONFIG_VPLAYER_DECODER
141 #define vplayer_options options
151 .init = linebreak_init,
152 .priv_class = &vplayer_decoder_class,
156 #if CONFIG_PJS_DECODER
157 #define pjs_options options
167 .init = linebreak_init,
168 .priv_class = &pjs_decoder_class,
172 #if CONFIG_SUBVIEWER1_DECODER
173 #define subviewer1_options options
176 AVCodec ff_subviewer1_decoder = {
177 .
name =
"subviewer1",
183 .init = linebreak_init,
184 .priv_class = &subviewer1_decoder_class,