summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-22 17:57:59 +0100
committerwm4 <wm4@nowhere>2015-01-22 18:18:23 +0100
commit16cc429eb8ba74da9a774186e25b171e416d99a6 (patch)
tree1a2e1488547b14bc39fede0de9ab3decda80bbf3 /video
parent74581a61064f56b170e555fa72d9cdca161d2307 (diff)
downloadmpv-16cc429eb8ba74da9a774186e25b171e416d99a6.tar.bz2
mpv-16cc429eb8ba74da9a774186e25b171e416d99a6.tar.xz
vo_vdpau: don't render to an output surface if it could be busy
There was a case when we could have rendered to an output surface while it's still used for display. Not sure why the API doesn't do this automatically.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_vdpau.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index e89cda6490..b001ea759d 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -158,6 +158,12 @@ static int render_video_to_output_surface(struct vo *vo,
VdpStatus vdp_st;
struct mp_image *mpi = vc->current_image;
+ vdp_st = vdp->presentation_queue_block_until_surface_idle(vc->flip_queue,
+ output_surface,
+ &dummy);
+ CHECK_VDP_WARNING(vo, "Error when calling "
+ "vdp_presentation_queue_block_until_surface_idle");
+
if (!mpi) {
// At least clear the screen if there is nothing to render
int flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0;
@@ -168,12 +174,6 @@ static int render_video_to_output_surface(struct vo *vo,
return -1;
}
- vdp_st = vdp->presentation_queue_block_until_surface_idle(vc->flip_queue,
- output_surface,
- &dummy);
- CHECK_VDP_WARNING(vo, "Error when calling "
- "vdp_presentation_queue_block_until_surface_idle");
-
if (vc->rgb_mode) {
// Clear the borders between video and window (if there are any).
// For some reason, video_mixer_render doesn't need it for YUV.