From 4590600a42f61dc63d4becfccd60bfc5f8dcbfcd Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 9 Oct 2010 13:35:16 +0000 Subject: vo_dxr3: Fix validity checks before closing a file descriptor -1 is invalid (and the initial value), 0 is not. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32467 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_dxr3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 41e1dcfd4e..ab2318edd2 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -682,13 +682,13 @@ static void uninit(void) } } - if (fd_video) { + if (fd_video != -1) { close(fd_video); } - if (fd_spu) { + if (fd_spu != -1) { close(fd_spu); } - if (fd_control) { + if (fd_control != -1) { close(fd_control); } #ifdef SPU_SUPPORT -- cgit v1.2.3