summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-22 20:55:05 +0200
committerwm4 <wm4@nowhere>2014-05-24 16:54:54 +0200
commit55c3055784bed2ba7fff5131506f7f95b922fa46 (patch)
tree3c6acf160f90247774c0b28f685b1e315e4c346d
parent58fbe50d6888b958010e6048241a3ecf34d5d73b (diff)
downloadmpv-55c3055784bed2ba7fff5131506f7f95b922fa46.tar.bz2
mpv-55c3055784bed2ba7fff5131506f7f95b922fa46.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.
-rw-r--r--video/out/vo_vdpau.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index d80f5dab48..877a3765bf 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -655,6 +655,12 @@ static int initialize_vdpau_objects(struct vo *vo)
&vc->rgb_surfaces[n]);
CHECK_VDP_ERROR(vo, "Allocating RGB surface");
}
+ } else {
+ if (create_vdp_mixer(vo, vc->vdp_chroma_type) < 0)
+ return -1;
+ }
+
+ 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");
@@ -663,9 +669,6 @@ static int initialize_vdpau_objects(struct vo *vo)
(const void*[]){data},
(uint32_t[]){4}, NULL);
CHECK_VDP_ERROR(vo, "Initializing clearing surface");
- } else {
- if (create_vdp_mixer(vo, vc->vdp_chroma_type) < 0)
- return -1;
}
forget_frames(vo, false);