summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-02-21 12:58:36 +0100
committerClément Bœsch <u@pkh.me>2016-02-26 21:53:34 +0100
commit22ebbda637257a432c99330ca4c6024665418f0e (patch)
tree149ca54d92cc1915326106f1fc8cb1ae04a922c1 /libavcodec/utils.c
parentfa2df3a40124bf1d0dc11999f5a578d40a29d553 (diff)
downloadffmpeg-22ebbda637257a432c99330ca4c6024665418f0e.tar.gz
lavc: deprecate decoded ass subtitles with timings
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 49a3e88710..0da82adaf9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2426,6 +2426,7 @@ static int utf8_check(const uint8_t *str)
return 1;
}
+#if FF_API_ASS_TIMING
static void insert_ts(AVBPrint *buf, int ts)
{
if (ts == -1) {
@@ -2495,6 +2496,7 @@ static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVR
av_bprint_finalize(&buf, NULL);
return 0;
}
+#endif
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr,
@@ -2546,9 +2548,11 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
av_assert1((ret >= 0) >= !!*got_sub_ptr &&
!!*got_sub_ptr >= !!sub->num_rects);
+#if FF_API_ASS_TIMING
if (avctx->sub_text_format == FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS
&& *got_sub_ptr && sub->num_rects)
ret = convert_sub_to_old_ass_form(sub, avpkt, avctx->time_base);
+#endif
if (sub->num_rects && !sub->end_display_time && avpkt->duration &&
avctx->pkt_timebase.num) {