[x264-devel] [Git][videolan/x264][master] windows: Fix named pipes detection

Anton Mitrofanov (@BugMaster) gitlab at videolan.org
Fri Jun 6 19:54:29 UTC 2025



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
291476d7 by Anton Mitrofanov at 2025-06-06T19:34:05+00:00
windows: Fix named pipes detection

The _wstati64 call succeeds on named pipes, so to check correctly you
must first check the result of WaitNamedPipeW.

- - - - -


1 changed file:

- common/osdep.h


Changes:

=====================================
common/osdep.h
=====================================
@@ -247,9 +247,8 @@ static inline int x264_is_regular_file_path( const char *path )
     if( path_utf16 )
     {
         x264_struct_stat buf;
-        if( _wstati64( path_utf16, &buf ) )
-            ret = !WaitNamedPipeW( path_utf16, 0 );
-        else
+        ret = !(WaitNamedPipeW( path_utf16, 0 ) || GetLastError() == ERROR_SEM_TIMEOUT);
+        if( ret && !_wstati64( path_utf16, &buf ) )
             ret = S_ISREG( buf.st_mode );
         if( path_utf16 != path_buf )
             free( path_utf16 );



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/291476d73386eb6f0362214f28dce058c3fff3d9

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/291476d73386eb6f0362214f28dce058c3fff3d9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the x264-devel mailing list