This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new fd9f1e9c52 avfilter/vf_drawtext: fix newline rendered as .notdef glyph
fd9f1e9c52 is described below

commit fd9f1e9c52d4c46cfc8d9d71c31feb925cbed636
Author:     Zhao Zhili <[email protected]>
AuthorDate: Mon Mar 23 20:10:12 2026 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Thu Mar 26 07:24:15 2026 +0000

    avfilter/vf_drawtext: fix newline rendered as .notdef glyph
    
    GET_UTF8 advances the pointer past the newline byte before the
    newline check, so shape_text_hb receives text that includes the
    newline character. Since HarfBuzz does not treat U+000A as
    default-ignorable, it gets shaped into a .notdef glyph.
    
    Fixes #21565
    
    Reported-by: scriptituk <[email protected]>
    Signed-off-by: Zhao Zhili <[email protected]>
---
 libavfilter/vf_drawtext.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 2812de37f5..d2d3bd8f69 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1452,13 +1452,14 @@ continue_on_failed:
             s->tab_clusters[tab_idx++] = i;
             *p = ' ';
         }
+        size_t len = p - start;
         GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto 
continue_on_failed2;);
 continue_on_failed2:
         if (ff_is_newline(code) || code == 0) {
             TextLine *cur_line = &s->lines[line_count];
             HarfbuzzData *hb = &cur_line->hb_data;
             cur_line->cluster_offset = line_offset;
-            ret = shape_text_hb(s, hb, start, p - start);
+            ret = shape_text_hb(s, hb, start, len);
             if (ret != 0) {
                 goto done;
             }

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to