[FFmpeg-cvslog] drawtext: draw glyphs for the strftime()-expanded text

Stefano Sabatini git at videolan.org
Sun Mar 27 19:06:20 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sun Mar 27 18:32:52 2011 +0200| [efc8c709c93875dffa4c4181fa9b56fa6d20d4c7] | committer: Stefano Sabatini

drawtext: draw glyphs for the strftime()-expanded text

In draw_glyphs(), draw glyphs in dtext->expanded_text rather than in
dtext->text. Fix crash if a strftime() sequence is used.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efc8c709c93875dffa4c4181fa9b56fa6d20d4c7
---

 libavfilter/vf_drawtext.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 2751354..9b6ae7d 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -498,7 +498,7 @@ static inline void drawbox(AVFilterBufferRef *picref, unsigned int x, unsigned i
 static int draw_glyphs(DrawTextContext *dtext, AVFilterBufferRef *picref,
                        int width, int height, const uint8_t rgbcolor[4], const uint8_t yuvcolor[4], int x, int y)
 {
-    char *text = dtext->text;
+    char *text = HAVE_LOCALTIME_R ? dtext->expanded_text : dtext->text;
     uint32_t code = 0;
     int i;
     uint8_t *p;




More information about the ffmpeg-cvslog mailing list