diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-01-04 02:44:49 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-01-04 11:44:22 +0100 |
commit | 6e5fd52dde9ff2cef3ff5b8d6b2b59bc4dd0ebbd (patch) | |
tree | f616cc144bd4df742b8901d7b982c23cb098f0f5 /player/video.c | |
parent | ab5b25034331ea7740b12e5314e16b1d5ad7624b (diff) | |
download | mpv-6e5fd52dde9ff2cef3ff5b8d6b2b59bc4dd0ebbd.tar.bz2 mpv-6e5fd52dde9ff2cef3ff5b8d6b2b59bc4dd0ebbd.tar.xz |
player/video: set video_out to NULL before broadcasting events
This avoids possible reference of video_out after destory.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |