[x264-devel] [PATCH] Update osdep.h for detecting Windows namedpipe by name
Richard
ccc7922 at foxmail.com
Sun May 11 03:47:04 UTC 2025
From 9dba52cd4c776cd13fb4995885f2d5b3221e819c Mon Sep 17 00:00:00 2001
From: Mr-Z-2697 <74594146+Mr-Z-2697 at users.noreply.github.com>
Date: Sun, 11 May 2025 11:30:26 +0800
Subject: [PATCH] osdep.h: detect Windows named pipe by name
Named pipe in Windows is more delicate, if we proceed to the steps further down, the pipe will probably be broken.
---
common/osdep.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/osdep.h b/common/osdep.h
index 23739b7a..4f2bd0ca 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -242,6 +242,8 @@ static inline int x264_vfprintf( FILE *stream, const char *format, va_list arg )
static inline int x264_is_regular_file_path( const char *path )
{
int ret = -1;
+ if ( !strncasecmp( path, "\\\\.\\pipe\\", 9 ) )
+ return 0;
wchar_t path_buf[MAX_PATH];
wchar_t *path_utf16 = x264_utf8_to_utf16_try_buf( path, path_buf, MAX_PATH );
if( path_utf16 )
--
2.49.0.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20250511/8c943f9c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-osdep.h-detect-Windows-named-pipe-by-name.patch
Type: application/octet-stream
Size: 947 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20250511/8c943f9c/attachment.obj>
More information about the x264-devel
mailing list