From dbed21cde451aed60e7e06b3c700234dcffd8012 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 May 2014 20:55:05 +0200 Subject: 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. --- video/out/vo_vdpau.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video') 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"); -- cgit v1.2.3