diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-25 20:30:58 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:04 -0300 |
commit | 1f63665ca567fbc49fa80166d468a822c2999efa (patch) | |
tree | 37f924e42ce3c908effe38b56c072df020e18a9e /libavcodec/ttmlenc.c | |
parent | cb172ae9abf465093a607fe216d40c84f677b209 (diff) | |
download | ffmpeg-1f63665ca567fbc49fa80166d468a822c2999efa.tar.gz |
avcodec: Remove deprecated ASS with inline timing
Deprecated in 22ebbda637257a432c99330ca4c6024665418f0e.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/ttmlenc.c')
-rw-r--r-- | libavcodec/ttmlenc.c | 39 |
1 files changed, 0 insertions, 39 deletions
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, "<span region=\""); - av_bprint_escape(&s->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, "</span>"); - } - } 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)) |