1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-23 03:37:27 +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:
Uoti Urpala 2010-01-28 01:12:34 +02:00
parent c710c5ee50
commit 42244dd2a4

View File

@ -520,14 +520,13 @@ void vo_uninit(struct vo_x11_state *x11)
{
mp_msg(MSGT_VO, MSGL_V,
"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);
}