diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
commit | ad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch) | |
tree | 89f2d90c5586560911e67c872b530c77f151168d /video/vdpau_mixer.c | |
parent | 0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff) | |
parent | 393bb2a565dc1e27812e1dd20747814892f80da2 (diff) | |
download | mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2 mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'video/vdpau_mixer.c')
-rw-r--r-- | video/vdpau_mixer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c index 7025aef459..d6f93a9d13 100644 --- a/video/vdpau_mixer.c +++ b/video/vdpau_mixer.c @@ -71,6 +71,7 @@ struct mp_vdpau_mixer *mp_vdpau_mixer_create(struct mp_vdpau_ctx *vdp_ctx, .capabilities = MP_CSP_EQ_CAPS_COLORMATRIX, }, }; + mp_vdpau_handle_preemption(mixer->ctx, &mixer->preemption_counter); return mixer; } @@ -228,6 +229,13 @@ int mp_vdpau_mixer_render(struct mp_vdpau_mixer *mixer, if (!video_rect) video_rect = &fallback_rect; + int pe = mp_vdpau_handle_preemption(mixer->ctx, &mixer->preemption_counter); + if (pe < 1) { + mixer->video_mixer = VDP_INVALID_HANDLE; + if (pe < 0) + return -1; + } + if (video->imgfmt == IMGFMT_VDPAU_OUTPUT) { VdpOutputSurface surface = (uintptr_t)video->planes[3]; int flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0; |