summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-27 18:32:52 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-27 19:00:03 +0200
commitefc8c709c93875dffa4c4181fa9b56fa6d20d4c7 (patch)
treefdfe40392c8f9fc3eb1003ed0ff455eba4e8d8d7
parent5c5816c4e3e4b267788ce5756728539fe6c49549 (diff)
downloadffmpeg-efc8c709c93875dffa4c4181fa9b56fa6d20d4c7.tar.gz
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.
-rw-r--r--libavfilter/vf_drawtext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 275135482d..9b6ae7d179 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;