summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Auras <yak54@inkennet.de>2012-02-03 19:45:09 +0000
committerAndreas Auras <yak54@inkennet.de>2012-02-03 19:45:09 +0000
commit447b0fe8cf73914b19dd376a8663939e0414225a (patch)
tree9a1b6f022bddcdd0ab4b363fa39f4b5cd44e32ef
parent394844752785840a9a2f50febcaf58f9b8cbc0a7 (diff)
downloadxine-lib-447b0fe8cf73914b19dd376a8663939e0414225a.tar.gz
xine-lib-447b0fe8cf73914b19dd376a8663939e0414225a.tar.bz2
Fixed overlay surface reuse issue for raw rgba overlays within vdpau output driver.
-rw-r--r--src/video_out/video_out_vdpau.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c
index 95903e21e..a10e8a5dc 100644
--- a/src/video_out/video_out_vdpau.c
+++ b/src/video_out/video_out_vdpau.c
@@ -580,11 +580,11 @@ static void vdpau_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, v
vdpau_overlay_t *ovl = &this->overlays[i];
if (i >= this->old_num_ovls ||
- !ovl->use_dirty_rect ||
- ovl->render_surface.surface == VDP_INVALID_HANDLE ||
- voovl->rle ||
- ovl->x != voovl->x || ovl->y != voovl->y ||
- ovl->width != voovl->width || ovl->height != voovl->height)
+ (ovl->use_dirty_rect &&
+ (ovl->render_surface.surface == VDP_INVALID_HANDLE ||
+ voovl->rle ||
+ ovl->x != voovl->x || ovl->y != voovl->y ||
+ ovl->width != voovl->width || ovl->height != voovl->height)))
ovl->use_dirty_rect = 0;
ovl->ovl = voovl;
@@ -614,7 +614,7 @@ static void vdpau_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen)
int i;
for (i = 0; i < this->old_num_ovls; ++i) {
vdpau_overlay_t *ovl = &this->overlays[i];
- if (!ovl->use_dirty_rect) {
+ if (i >= this->num_ovls || !ovl->use_dirty_rect) {
lprintf("overlay[%d] free render surface %d\n", i, (int)ovl->render_surface.surface);
vdpau_free_output_surface(this, &ovl->render_surface);
}