@@ -78,11 +78,14 @@ typedef struct TeletextContext
int last_pgno;
int last_p5;
int last_ass_alignment;
+
+ FFASSHeaderOptions common;
} TeletextContext;
static int my_ass_subtitle_header(AVCodecContext *avctx)
{
- int ret = ff_ass_subtitle_header_default(avctx);
+ TeletextContext *ctx = avctx->priv_data;
+ int ret = ff_ass_subtitle_header_from_opts(avctx, &ctx->common);
char *new_header;
uint8_t *event_pos;
@@ -756,7 +759,7 @@ static int teletext_init_decoder(AVCodecContext *avctx)
case 0:
return 0;
case 1:
- return ff_ass_subtitle_header_default(avctx);
+ return ff_ass_subtitle_header_from_opts(avctx, &ctx->common);
case 2:
return my_ass_subtitle_header(avctx);
}
@@ -803,6 +806,7 @@ static const AVOption options[] = {
{"txt_duration", "display duration of teletext pages in msecs", OFFSET(sub_duration), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 86400000, SD},
{"txt_transparent", "force transparent background of the teletext", OFFSET(transparent_bg), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SD},
{"txt_opacity", "set opacity of the transparent background", OFFSET(opacity), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 255, SD},
+ ASS_HEADER_AVOPTIONS(TeletextContext, common)
{ NULL },
};