From 1f63665ca567fbc49fa80166d468a822c2999efa Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 25 Feb 2021 20:30:58 +0100 Subject: avcodec: Remove deprecated ASS with inline timing Deprecated in 22ebbda637257a432c99330ca4c6024665418f0e. Signed-off-by: Andreas Rheinhardt Signed-off-by: James Almer --- libavcodec/ttmlenc.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'libavcodec/ttmlenc.c') diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c index 6dfcc0a216..a0c605b918 100644 --- a/libavcodec/ttmlenc.c +++ b/libavcodec/ttmlenc.c @@ -94,42 +94,6 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, return AVERROR(EINVAL); } -#if FF_API_ASS_TIMING - if (!strncmp(ass, "Dialogue: ", 10)) { - int num; - dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num); - - for (; dialog && num--; dialog++) { - if (dialog->style) { - av_bprintf(&s->buffer, "buffer, dialog->style, NULL, - AV_ESCAPE_MODE_XML, - AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES); - av_bprintf(&s->buffer, "\">"); - } - - { - int ret = ff_ass_split_override_codes(&ttml_callbacks, s, - dialog->text); - int log_level = (ret != AVERROR_INVALIDDATA || - avctx->err_recognition & AV_EF_EXPLODE) ? - AV_LOG_ERROR : AV_LOG_WARNING; - - if (ret < 0) { - av_log(avctx, log_level, - "Splitting received ASS dialog failed: %s\n", - av_err2str(ret)); - - if (log_level == AV_LOG_ERROR) - return ret; - } - } - - if (dialog->style) - av_bprintf(&s->buffer, ""); - } - } else { -#endif dialog = ff_ass_split_dialog2(s->ass_ctx, ass); if (!dialog) return AVERROR(ENOMEM); @@ -166,9 +130,6 @@ static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, ff_ass_free_dialog(&dialog); } -#if FF_API_ASS_TIMING - } -#endif } if (!av_bprint_is_complete(&s->buffer)) -- cgit v1.2.3