[x264-devel] some questions about "x264_is_regular_file" & "x264_is_regular_file_path" in file "common\osdep.h"

Jason Garrett-Glaser jason at x264.com
Fri Apr 13 18:16:32 CEST 2012


On Fri, Mar 30, 2012 at 9:57 AM, zxfishhack <zxfishhack at 126.com> wrote:
> There is some problem that using a pipe for input stream of x264.exe on
> Window Platform, I think the problem is the two functions I mention.
> I think it's check the return value in wrong way.
>
> In the function mention in the topic, I found the code below:
>
>     if( fstat( fileno( filehandle ), &file_stat ) )
>         return -1;
>
>     if( stat( filename, &file_stat ) )
>         return -1;
>
> but when I check for fstat & stat in MSDN and Linux man page @linux.die.net
> , I found the return value is defined below:
> fstat - Linux man page(link: http://linux.die.net/man/2/fstat)

I'm not sure exactly what the problem is?  The descriptions you posted
say "-1 is error, 0 is no error", which the current code works
correctly with.

Jason


More information about the x264-devel mailing list