[FFmpeg-cvslog] r19513 - trunk/libavformat/file.c

benoit subversion
Mon Jul 27 14:36:22 CEST 2009


Author: benoit
Date: Mon Jul 27 14:36:22 2009
New Revision: 19513

Log:
Only consider -1 as an error return value for open().
This is:
 - what Posix says (-1 on error, >=0 on success)
 - fixing a bug on winCE (<0 sometimes)

Patch by Martin Storsj?: martin martin st

Modified:
   trunk/libavformat/file.c

Modified: trunk/libavformat/file.c
==============================================================================
--- trunk/libavformat/file.c	Mon Jul 27 01:08:04 2009	(r19512)
+++ trunk/libavformat/file.c	Mon Jul 27 14:36:22 2009	(r19513)
@@ -51,7 +51,7 @@ static int file_open(URLContext *h, cons
     access |= O_BINARY;
 #endif
     fd = open(filename, access, 0666);
-    if (fd < 0)
+    if (fd == -1)
         return AVERROR(ENOENT);
     h->priv_data = (void *) (intptr_t) fd;
     return 0;



More information about the ffmpeg-cvslog mailing list