summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>2012-02-05 00:14:16 +0200
committerAnton Khirnov <anton@khirnov.net>2012-02-06 07:52:05 +0100
commit2b43dfce3651bc517c66365a30f30b708d6b79af (patch)
tree0b0cc68447f3a029c625b4cd48ea270ab5ed5d95 /libavfilter/vf_drawtext.c
parente7f0bc8c0f1c4a8731eb1c33cb013296a0555538 (diff)
drawtext: fix text_{w, h} expression vars
Before, {text_,}{w,h} vars hadn't got initialized Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index c5a6ffe60f..f6ce1243e6 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -550,7 +550,9 @@ static int dtext_prepare_text(AVFilterContext *ctx)
y = FFMIN(y + text_height, height - 1);
dtext->w = str_w;
+ dtext->var_values[VAR_TEXT_W] = dtext->var_values[VAR_TW] = dtext->w;
dtext->h = y;
+ dtext->var_values[VAR_TEXT_H] = dtext->var_values[VAR_TH] = dtext->h;
return 0;
}