summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-04 22:19:42 +0100
committerwm4 <wm4@nowhere>2015-01-04 22:19:42 +0100
commite7b78bea65a8e039ed60586093d18ab81151b838 (patch)
tree810fb3c2a452c41932baa1530f44d36aeeeebbcb
parentd5e744d4b8a36ece3957c3313bbb6181dd8965ef (diff)
downloadmpv-e7b78bea65a8e039ed60586093d18ab81151b838.tar.bz2
mpv-e7b78bea65a8e039ed60586093d18ab81151b838.tar.xz
client API, vo_opengl_cb: properly uninit video
mpv_opengl_cb_uninit_gl() can be called at any time; but then the decoder must be destroyed due to complications with hardware decoding. This is why kill_video() exists. To make things easier, there is the invariant that while vo_opengl_cb is active, the OpenGL state must exist. But kill_video() didn't actually destroy the VO; only the video decoder. This could trigger an assertion (vo_opengl_cb.c:187). Actually, the video output is always destroyed lazily at a later point if the decoder is destroyed, but not early enough for out purposes.
-rw-r--r--player/client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c
index facac7174a..dee890efb3 100644
--- a/player/client.c
+++ b/player/client.c
@@ -1633,6 +1633,7 @@ void kill_video(struct mp_client_api *client_api)
struct MPContext *mpctx = client_api->mpctx;
mp_dispatch_lock(mpctx->dispatch);
mp_switch_track(mpctx, STREAM_VIDEO, NULL);
+ uninit_video_out(mpctx);
mp_dispatch_unlock(mpctx->dispatch);
}