changeset 31763:550ffba86d9c

Make the VDPAU background black instead of the default green. (This was reported repeatedly as a problem for users.) Patch by Vlad Seryakov, vseryakov at gmail
author cehoyos
date Tue, 27 Jul 2010 08:38:08 +0000
parents da0bfd02286c
children 00884af812b8
files libvo/vo_vdpau.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_vdpau.c	Mon Jul 26 19:41:04 2010 +0000
+++ b/libvo/vo_vdpau.c	Tue Jul 27 08:38:08 2010 +0000
@@ -124,6 +124,7 @@
 static VdpPresentationQueueDisplay       *vdp_presentation_queue_display;
 static VdpPresentationQueueBlockUntilSurfaceIdle *vdp_presentation_queue_block_until_surface_idle;
 static VdpPresentationQueueTargetCreateX11       *vdp_presentation_queue_target_create_x11;
+static VdpPresentationQueueSetBackgroundColor    *vdp_presentation_queue_set_background_color;
 
 static VdpOutputSurfaceRenderOutputSurface       *vdp_output_surface_render_output_surface;
 static VdpOutputSurfacePutBitsIndexed            *vdp_output_surface_put_bits_indexed;
@@ -370,6 +371,8 @@
                         &vdp_presentation_queue_block_until_surface_idle},
         {VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11,
                         &vdp_presentation_queue_target_create_x11},
+        {VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR,
+                        &vdp_presentation_queue_set_background_color},
         {VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE,
                         &vdp_output_surface_render_output_surface},
         {VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED,
@@ -416,6 +419,7 @@
 static int win_x11_init_vdpau_flip_queue(void)
 {
     VdpStatus vdp_st;
+    VdpColor  vdp_bg = { 0, 0, 0, 0 };
 
     vdp_st = vdp_presentation_queue_target_create_x11(vdp_device, vo_window,
                                                       &vdp_flip_target);
@@ -425,6 +429,8 @@
                                            &vdp_flip_queue);
     CHECK_ST_ERROR("Error when calling vdp_presentation_queue_create")
 
+    vdp_st = vdp_presentation_queue_set_background_color(vdp_flip_queue, &vdp_bg);
+    CHECK_ST_ERROR("Error when calling vdp_presentation_queue_set_background_color")
     return 0;
 }