aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ass.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2014-09-21 18:36:11 +0200
committerClément Bœsch <u@pkh.me>2014-09-21 18:41:45 +0200
commitd210c0e777c181f3954582703c95e85d885d68c1 (patch)
treeadd367051a8b879c5849bce926c4463d47e0b1ea /libavcodec/ass.c
parentdcdc1cbf4321071b933e14d59afc518321d2450a (diff)
downloadffmpeg-d210c0e777c181f3954582703c95e85d885d68c1.tar.gz
avcodec/ass: add ff_ass_add_rect_bprint() helper
Diffstat (limited to 'libavcodec/ass.c')
-rw-r--r--libavcodec/ass.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index a5b5ae5fb2..ba0593c936 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -151,6 +151,14 @@ err:
return ret;
}
+int ff_ass_add_rect_bprint(AVSubtitle *sub, const AVBPrint *buf,
+ int ts_start, int duration, int raw)
+{
+ if (!av_bprint_is_complete(buf))
+ return AVERROR(ENOMEM);
+ return ff_ass_add_rect(sub, buf->str, ts_start, duration, raw);
+}
+
void ff_ass_bprint_text_event(AVBPrint *buf, const char *p, int size,
const char *linebreaks, int keep_ass_markup)
{