mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
x11_common: always free x11 context struct on exit
Previously it was not freed if no X11 display had been opened (for example -vo null).
This commit is contained in:
parent
c710c5ee50
commit
42244dd2a4
@ -520,14 +520,13 @@ void vo_uninit(struct vo_x11_state *x11)
|
|||||||
{
|
{
|
||||||
mp_msg(MSGT_VO, MSGL_V,
|
mp_msg(MSGT_VO, MSGL_V,
|
||||||
"vo: x11 uninit called but X11 not initialized..\n");
|
"vo: x11 uninit called but X11 not initialized..\n");
|
||||||
return;
|
} else {
|
||||||
|
mp_msg(MSGT_VO, MSGL_V, "vo: uninit ...\n");
|
||||||
|
XSetErrorHandler(NULL);
|
||||||
|
XCloseDisplay(x11->display);
|
||||||
|
x11->depthonscreen = 0;
|
||||||
|
x11->display = NULL;
|
||||||
}
|
}
|
||||||
// if( !vo_depthonscreen ) return;
|
|
||||||
mp_msg(MSGT_VO, MSGL_V, "vo: uninit ...\n");
|
|
||||||
XSetErrorHandler(NULL);
|
|
||||||
XCloseDisplay(x11->display);
|
|
||||||
x11->depthonscreen = 0;
|
|
||||||
x11->display = NULL;
|
|
||||||
talloc_free(x11);
|
talloc_free(x11);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user