Fixes Ticket5720
Showing the changes to libavfilter/drawutils.c (1 of 1 file). Show all
Unified · Split
| @@ -450,6 +450,7 @@ void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color, · 449 unmodified lines | ||
| 450 | 450 | alpha = 0x101 * color->rgba[3] + 0x2; |
| 451 | 451 | } |
| 452 | 452 | nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA); |
| 453 | + nb_planes += !nb_planes; | |
| 453 | 454 | for (plane = 0; plane < nb_planes; plane++) { |
| 454 | 455 | nb_comp = draw->pixelstep[plane]; |
| 455 | 456 | p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0); |
| @@ -627,6 +628,7 @@ void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color, · 171 unmodified lines | ||
| 627 | 628 | alpha = (0x101 * color->rgba[3] + 0x2) >> 8; |
| 628 | 629 | } |
| 629 | 630 | nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA); |
| 631 | + nb_planes += !nb_planes; | |
| 630 | 632 | for (plane = 0; plane < nb_planes; plane++) { |
| 631 | 633 | nb_comp = draw->pixelstep[plane]; |
| 632 | 634 | p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0); |