diff options
author | Christian König <[email protected]> | 2012-06-14 17:52:20 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-06-20 10:13:38 +0200 |
commit | 0f269c5e7b593eb29d5c1058dcd53fc6476871a9 (patch) | |
tree | df19335a16c5e8bba9fabacec8e43696200039ce /src | |
parent | d37c3c6ebecfe404d2341b897ac9b81adce5f4d7 (diff) |
st/vdpau: use template size as default for source_rect.
Fixes alignment problems with flash player.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index e3c9349bfc4..81a5c293685 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -216,7 +216,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, VdpLayer const *layers) { enum vl_compositor_deinterlace deinterlace; - struct u_rect rect, clip; + struct u_rect rect, clip, *prect; unsigned i, layer = 0; vlVdpVideoMixer *vmixer; @@ -281,8 +281,15 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, pipe_mutex_unlock(vmixer->device->mutex); return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE; }; - vl_compositor_set_buffer_layer(&vmixer->cstate, compositor, layer, surf->video_buffer, - RectToPipe(video_source_rect, &rect), NULL, deinterlace); + prect = RectToPipe(video_source_rect, &rect); + if (!prect) { + rect.x0 = 0; + rect.y0 = 0; + rect.x1 = surf->templat.width; + rect.y1 = surf->templat.height; + prect = ▭ + } + vl_compositor_set_buffer_layer(&vmixer->cstate, compositor, layer, surf->video_buffer, prect, NULL, deinterlace); vl_compositor_set_layer_dst_area(&vmixer->cstate, layer++, RectToPipe(destination_video_rect, &rect)); for (i = 0; i < layer_count; ++i) { |