diff options
author | wm4 <wm4@nowhere> | 2014-05-22 20:55:05 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-22 20:55:05 +0200 |
commit | dbed21cde451aed60e7e06b3c700234dcffd8012 (patch) | |
tree | 597f8a94b93a4aa1039f2f01302bbe774e78ee68 /video | |
parent | 52ff1cf3138485b0083af5ff4369848f0e32e7da (diff) | |
download | mpv-dbed21cde451aed60e7e06b3c700234dcffd8012.tar.bz2 mpv-dbed21cde451aed60e7e06b3c700234dcffd8012.tar.xz |
vo_vdpau: always allocate the black pixel
black_pixel is an (apparently necessary) 1x1 black surface used for
clearing the screen. It was allocated in RGB mode only, but is sometimes
used in YUV mode too.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_vdpau.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 0ce9f888f1..260b9dccff 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -421,6 +421,9 @@ static int initialize_vdpau_objects(struct vo *vo) &vc->rgb_surfaces[n]); CHECK_VDP_ERROR(vo, "Allocating RGB surface"); } + } + + if (vc->black_pixel == VDP_INVALID_HANDLE) { vdp_st = vdp->output_surface_create(vc->vdp_device, OUTPUT_RGBA_FORMAT, 1, 1, &vc->black_pixel); CHECK_VDP_ERROR(vo, "Allocating clearing surface"); |