summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-04-30 14:55:14 +0200
committerChristian König <[email protected]>2013-05-01 13:33:46 +0200
commit3aafe2437da09fcc1f40b38bb73ec2759fde87eb (patch)
tree067bc0110b02d42be8ad5e5a353dd099bfa593bc /src
parent7d2f2a0c890b1993532a45c8c392c28950ddc06e (diff)
st/vdpau: fix background handling in the mixer
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/vdpau/mixer.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index 1d2ae497b07..26db5c8bd8b 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -221,7 +221,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
vlVdpVideoMixer *vmixer;
vlVdpSurface *surf;
- vlVdpOutputSurface *dst;
+ vlVdpOutputSurface *dst, *bg = NULL;
struct vl_compositor *compositor;
@@ -250,20 +250,21 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
if (!dst)
return VDP_STATUS_INVALID_HANDLE;
- pipe_mutex_lock(vmixer->device->mutex);
- vlVdpResolveDelayedRendering(vmixer->device, NULL, NULL);
if (background_surface != VDP_INVALID_HANDLE) {
- vlVdpOutputSurface *bg = vlGetDataHTAB(background_surface);
- if (!bg) {
- pipe_mutex_unlock(vmixer->device->mutex);
+ bg = vlGetDataHTAB(background_surface);
+ if (!bg)
return VDP_STATUS_INVALID_HANDLE;
- }
- vl_compositor_set_rgba_layer(&vmixer->cstate, compositor, layer++, bg->sampler_view,
- RectToPipe(background_source_rect, &rect), NULL, NULL);
}
+ pipe_mutex_lock(vmixer->device->mutex);
+ vlVdpResolveDelayedRendering(vmixer->device, NULL, NULL);
+
vl_compositor_clear_layers(&vmixer->cstate);
+ if (bg)
+ vl_compositor_set_rgba_layer(&vmixer->cstate, compositor, layer++, bg->sampler_view,
+ RectToPipe(background_source_rect, &rect), NULL, NULL);
+
switch (current_picture_structure) {
case VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD:
deinterlace = VL_COMPOSITOR_BOB_TOP;