From 0e1491346edf32fb9576b60c743b6139edba84a7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 9 May 2014 21:49:32 +0200 Subject: 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. --- video/vdpau.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'video/vdpau.c') 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. -- cgit v1.2.3