@@ -86,6 +86,9 @@ typedef struct {
} TextWrapBox;
typedef struct {
+ AVClass *class;
+ int readorder;
+ FFASSHeaderOptions common;
StyleBox **s;
StyleBox *s_temp;
HighlightBox h;
@@ -99,7 +102,6 @@ typedef struct {
uint64_t tracksize;
int size_var;
int count_s, count_f;
- int readorder;
} MovTextContext;
typedef struct {
@@ -453,7 +455,7 @@ static int mov_text_init(AVCodecContext *avctx) {
m->d.underline, ASS_DEFAULT_BORDERSTYLE,
m->d.alignment);
} else
- return ff_ass_subtitle_header_default(avctx);
+ return ff_ass_subtitle_header_from_opts(avctx, &m->common);
}
static int mov_text_decode_frame(AVCodecContext *avctx,
@@ -567,6 +569,8 @@ static void mov_text_flush(AVCodecContext *avctx)
m->readorder = 0;
}
+ASS_GENERIC_CLASS(mov_text, "3GPP Timed Text")
+
AVCodec ff_movtext_decoder = {
.name = "mov_text",
.long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
@@ -577,4 +581,5 @@ AVCodec ff_movtext_decoder = {
.decode = mov_text_decode_frame,
.close = mov_text_decode_close,
.flush = mov_text_flush,
+ .priv_class = &mov_text_decoder_class,
};