aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-08 15:17:33 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-08 16:40:49 +0000
commit55c94f48ce5a81896fd7f71e2b2d2f2174dd94a8 (patch)
tree947457bf558b359252ee13c0d0636bfcbc217ec4 /libavfilter
parentd2dd1e075cf92442883b1cfe7156cac277b0eaed (diff)
downloadffmpeg-55c94f48ce5a81896fd7f71e2b2d2f2174dd94a8.tar.gz
lavfi/drawutils: fix planar rgb
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/drawutils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index b2307616e4..1952199dc9 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -197,10 +197,15 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
if (rgba != color->rgba)
memcpy(color->rgba, rgba, sizeof(color->rgba));
- if ((draw->desc->flags & AV_PIX_FMT_FLAG_RGB) && draw->nb_planes == 1 &&
+ if ((draw->desc->flags & AV_PIX_FMT_FLAG_RGB) &&
ff_fill_rgba_map(rgba_map, draw->format) >= 0) {
+ if (draw->nb_planes == 1) {
for (i = 0; i < 4; i++)
color->comp[0].u8[rgba_map[i]] = rgba[i];
+ } else {
+ for (i = 0; i < 4; i++)
+ color->comp[rgba_map[i]].u8[0] = rgba[i];
+ }
} else if (draw->nb_planes == 3 || draw->nb_planes == 4) {
/* assume YUV */
color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);