diff options
-rw-r--r-- | src/video_out/video_out_vdpau.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c index 241143bb9..5f1857362 100644 --- a/src/video_out/video_out_vdpau.c +++ b/src/video_out/video_out_vdpau.c @@ -444,10 +444,15 @@ static int vdpau_process_ovl( vdpau_driver_t *this_gen, vo_overlay_t *overlay ) rlelen = rle->len; clr = rle->color; for ( i=0; i<rlelen; ++i ) { - red = colors[clr].y; /* red */ - green = colors[clr].cr; /* green */ - blue = colors[clr].cb; /* blue */ - alpha = trans[clr]*255/15; + if ( trans[clr] == 0 ) { + alpha = red = green = blue = 0; + } + else { + red = colors[clr].y; /* red */ + green = colors[clr].cr; /* green */ + blue = colors[clr].cb; /* blue */ + alpha = trans[clr]*255/15; + } *rgba = (alpha<<24) | (red<<16) | (green<<8) | blue; rgba++; ++pos; |