summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorGyan Doshi <ffmpeg@gyani.pro>2018-07-10 15:14:06 +0530
committerGyan Doshi <ffmpeg@gyani.pro>2018-07-13 10:11:15 +0530
commit1a31c2b5df1179fdc1b8e84c8fa89d853e517309 (patch)
treec37be5b0519faae3cfe6946d4cde3181471c654d /libavfilter/vf_drawtext.c
parentb0644f7f72a9ae64c7285d26ec720441c25d4cf5 (diff)
downloadffmpeg-1a31c2b5df1179fdc1b8e84c8fa89d853e517309.tar.gz
avfilter/drawtext: fix box sizing
At present, box size is clipped to frame size before being drawn, which can lead to the box not fully covering animated text which is longer than one or both frame dimensions. Since ff_blend_rectangle correctly takes care of clipping, it is skipped here which results in correct box sizing
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 3affa736c7..cca2cbcb88 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1407,8 +1407,8 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
update_color_with_alpha(s, &bordercolor, s->bordercolor);
update_color_with_alpha(s, &boxcolor , s->boxcolor );
- box_w = FFMIN(width - 1 , max_text_line_w);
- box_h = FFMIN(height - 1, y + s->max_glyph_h);
+ box_w = max_text_line_w;
+ box_h = y + s->max_glyph_h;
if (s->fix_bounds) {