[FFmpeg-devel] [PATCH] Fix return value check for open()

Martin Storsjö martin
Fri Jul 24 13:33:40 CEST 2009


Hi,

According to all manuals I've checked (both linux & darwin manpages, and 
msdn docs), open() returns exactly -1 on error, not any generic negative 
number. The attached patch fixes the return value check in 
libavformat/file.c.

On WinCE, the return values from successful open() calls are negative 
sometimes, making url_open() calls fail randomly. This is fixed by the 
attached patch.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: open-return-value.patch
Type: text/x-diff
Size: 434 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090724/985de468/attachment.patch>



More information about the ffmpeg-devel mailing list