mirror of https://github.com/mpv-player/mpv
player/video: set video_out to NULL before broadcasting events
This avoids possible reference of video_out after destory.
This commit is contained in:
parent
ab5b250343
commit
6e5fd52dde
|
@ -129,9 +129,9 @@ void uninit_video_out(struct MPContext *mpctx)
|
||||||
uninit_video_chain(mpctx);
|
uninit_video_chain(mpctx);
|
||||||
if (mpctx->video_out) {
|
if (mpctx->video_out) {
|
||||||
vo_destroy(mpctx->video_out);
|
vo_destroy(mpctx->video_out);
|
||||||
|
mpctx->video_out = NULL;
|
||||||
mp_notify(mpctx, MPV_EVENT_VIDEO_RECONFIG, NULL);
|
mp_notify(mpctx, MPV_EVENT_VIDEO_RECONFIG, NULL);
|
||||||
}
|
}
|
||||||
mpctx->video_out = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vo_chain_uninit(struct vo_chain *vo_c)
|
static void vo_chain_uninit(struct vo_chain *vo_c)
|
||||||
|
|
Loading…
Reference in New Issue