From 9951210c1c196c3463d4d759a6f419e57b802e19 Mon Sep 17 00:00:00 2001 From: rfelker Date: Sat, 4 Jan 2003 19:17:37 +0000 Subject: don't keep mga_vid device open if x11 init fails (fixes "-vo xmga,mga") git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8779 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libvo/mga_common.c') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 193569fdf0..cb376587ce 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -421,7 +421,10 @@ static uint32_t preinit(const char *vo_subdevice) } #ifdef VO_XMGA - if (!vo_init()) return -1; + if (!vo_init()) { + close(f); + return -1; + } #endif return 0; -- cgit v1.2.3