From 6e5fd52dde9ff2cef3ff5b8d6b2b59bc4dd0ebbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 4 Jan 2024 02:44:49 +0100 Subject: [PATCH] player/video: set video_out to NULL before broadcasting events This avoids possible reference of video_out after destory. --- player/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/video.c b/player/video.c index 48a3165f9d..baa6db8d84 100644 --- a/player/video.c +++ b/player/video.c @@ -129,9 +129,9 @@ void uninit_video_out(struct MPContext *mpctx) uninit_video_chain(mpctx); if (mpctx->video_out) { vo_destroy(mpctx->video_out); + mpctx->video_out = NULL; mp_notify(mpctx, MPV_EVENT_VIDEO_RECONFIG, NULL); } - mpctx->video_out = NULL; } static void vo_chain_uninit(struct vo_chain *vo_c)