mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 09:32:40 +00:00
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.
This commit is contained in:
parent
d5e744d4b8
commit
e7b78bea65
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user