Commit 1a31c2b5 authored by Gyan Doshi's avatar Gyan Doshi

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
parent b0644f7f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment