[MPlayer-cvslog] r32467 - trunk/libvo/vo_dxr3.c

reimar subversion at mplayerhq.hu
Sat Oct 9 15:35:16 CEST 2010


Author: reimar
Date: Sat Oct  9 15:35:16 2010
New Revision: 32467

Log:
Fix validity checks before closing a file descriptor.
-1 is invalid (and the initial value), 0 is not.

Modified:
   trunk/libvo/vo_dxr3.c

Modified: trunk/libvo/vo_dxr3.c
==============================================================================
--- trunk/libvo/vo_dxr3.c	Sat Oct  9 15:31:03 2010	(r32466)
+++ trunk/libvo/vo_dxr3.c	Sat Oct  9 15:35:16 2010	(r32467)
@@ -705,13 +705,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


More information about the MPlayer-cvslog mailing list