diff mbox series

[FFmpeg-devel,6/6] avcodec/movtextenc: Simplify writing a single char

Message ID AM7PR03MB666039E054F01C00912E4F998F679@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit acdfc4bdfb1d800e9459ce700538f09174502d7e
Headers show
Series [FFmpeg-devel,1/6] avcodec/movtextenc: Fix infinite loop due to variable truncation | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 30, 2021, 10:50 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/movtextenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index 112af41093..5869942ec0 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -615,8 +615,8 @@  static void mov_text_text_cb(void *priv, const char *text, int len)
 static void mov_text_new_line_cb(void *priv, int forced)
 {
     MovTextContext *s = priv;
-    av_bprint_append_data(&s->buffer, "\n", 1);
     s->text_pos += 1;
+    av_bprint_chars(&s->buffer, '\n', 1);
 }
 
 static const ASSCodesCallbacks mov_text_callbacks = {