aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/srtenc.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/srtenc.c
parentfa2df3a40124bf1d0dc11999f5a578d40a29d553 (diff)
downloadffmpeg-22ebbda637257a432c99330ca4c6024665418f0e.tar.gz
lavc: deprecate decoded ass subtitles with timings
Diffstat (limited to 'libavcodec/srtenc.c')
-rw-r--r--libavcodec/srtenc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 88fc2411e5..9c8aefc66c 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -232,7 +232,7 @@ static int encode_frame(AVCodecContext *avctx,
{
SRTContext *s = avctx->priv_data;
ASSDialog *dialog;
- int i, num;
+ int i;
av_bprint_clear(&s->buffer);
@@ -244,7 +244,9 @@ static int 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++) {
@@ -253,6 +255,7 @@ static int encode_frame(AVCodecContext *avctx,
ff_ass_split_override_codes(cb, s, dialog->text);
}
} else {
+#endif
dialog = ff_ass_split_dialog2(s->ass_ctx, ass);
if (!dialog)
return AVERROR(ENOMEM);
@@ -260,7 +263,9 @@ static int encode_frame(AVCodecContext *avctx,
srt_style_apply(s, dialog->style);
ff_ass_split_override_codes(cb, s, dialog->text);
ff_ass_free_dialog(&dialog);
+#if FF_API_ASS_TIMING
}
+#endif
}
if (!av_bprint_is_complete(&s->buffer))