diff options
author | wm4 <wm4@nowhere> | 2015-01-22 17:57:59 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-25 17:00:21 +0900 |
commit | 74c214609233d515a79ecb3c887d1b300f887b82 (patch) | |
tree | ecd6a75b8d626d6fe87d406ea834c10083cb31ae /video | |
parent | 7af2cb08e22a151c93235c6b0a198f1505c9b365 (diff) | |
download | mpv-74c214609233d515a79ecb3c887d1b300f887b82.tar.bz2 mpv-74c214609233d515a79ecb3c887d1b300f887b82.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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 46190fd032..d54ee3df53 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -160,6 +160,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; @@ -170,12 +176,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) { VdpOutputSurface surface = (uintptr_t)mpi->planes[3]; int flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0; |