Skip to content

Commit

Permalink
player/video: set video_out to NULL before broadcasting events
Browse files Browse the repository at this point in the history
This avoids possible reference of video_out after destory.
  • Loading branch information
kasper93 authored and sfan5 committed Jan 4, 2024
1 parent ab5b250 commit 6e5fd52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion player/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e5fd52

Please sign in to comment.