summaryrefslogtreecommitdiffstats
path: root/video/vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-09 21:49:32 +0200
committerwm4 <wm4@nowhere>2014-05-10 10:44:16 +0200
commit0e1491346edf32fb9576b60c743b6139edba84a7 (patch)
tree7aeae7f3b877ebd5db0486c367a0cb56e0e067b5 /video/vdpau.c
parent203be26588798e7ecb22e02f116fc4fbec438a61 (diff)
downloadmpv-0e1491346edf32fb9576b60c743b6139edba84a7.tar.bz2
mpv-0e1491346edf32fb9576b60c743b6139edba84a7.tar.xz
vo_vdpau, vo_opengl: handle vdpau preemption differently
Use the newly provided mp_vdpau_handle_preemption() function, instead of accessing mp_vdpau_ctx fields directly. Will probably make multithreaded access to the vdpau context easier. Mostly unrelated to the actual changes, I've noticed that using hw decoding with vo_opengl sometimes leads to segfaults inside of nvidia's libGL when doing the following: 1. use hw decoding + vo_opengl 2. switch to console (will preempt on nvidia systems) 3. switch back to X (mpv will recover, switches to sw decoding) 4. enable hw decoding again 5. exit mpv Then it segfaults when mpv finally calls exit(). I'll just blame nvidia, although it seems likely that something in the gl_hwdec_vdpau.c preemption handling triggers corner cases in nvidia's code.
Diffstat (limited to 'video/vdpau.c')
-rw-r--r--video/vdpau.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/video/vdpau.c b/video/vdpau.c
index 2e21c80a56..b26d0ed27b 100644
--- a/video/vdpau.c
+++ b/video/vdpau.c
@@ -120,13 +120,6 @@ static int handle_preemption(struct mp_vdpau_ctx *ctx)
return 1;
}
-// Check whether vdpau initialization and preemption status is ok and we can
-// proceed normally.
-bool mp_vdpau_status_ok(struct mp_vdpau_ctx *ctx)
-{
- return handle_preemption(ctx) >= 0;
-}
-
// Check whether vdpau display preemption happened. The caller provides a
// preemption counter, which contains the logical timestamp of the last
// preemption handled by the caller. The counter can be 0 for init.