diff options
Diffstat (limited to 'libavcodec/webvttenc.c')
-rw-r--r-- | libavcodec/webvttenc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index f85b34092a..c84bbf4b4e 100644 --- a/libavcodec/webvttenc.c +++ b/libavcodec/webvttenc.c @@ -159,7 +159,7 @@ static int webvtt_encode_frame(AVCodecContext *avctx, { WebVTTContext *s = avctx->priv_data; ASSDialog *dialog; - int i, num; + int i; av_bprint_clear(&s->buffer); @@ -171,7 +171,9 @@ static int webvtt_encode_frame(AVCodecContext *avctx, return AVERROR(ENOSYS); } +#if FF_API_ASS_TIMING if (!strncmp(ass, "Dialogue: ", 10)) { + int num; dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); // TODO reindent for (; dialog && num--; dialog++) { @@ -179,13 +181,16 @@ static int webvtt_encode_frame(AVCodecContext *avctx, ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); } } else { +#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); webvtt_style_apply(s, dialog->style); ff_ass_split_override_codes(&webvtt_callbacks, s, dialog->text); ff_ass_free_dialog(&dialog); +#if FF_API_ASS_TIMING } +#endif } if (!av_bprint_is_complete(&s->buffer)) |