[vlc-commits] Win32: put duplicated file handles to binary mode
Rémi Denis-Courmont
git at videolan.org
Wed Sep 19 23:02:35 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 20 00:00:46 2012 +0300| [c2e8e530b3905c082ab342f8880a6e290884ea66] | committer: Rémi Denis-Courmont
Win32: put duplicated file handles to binary mode
This is more consistent with vlc_open() and vlc_pipe() behaviour.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2e8e530b3905c082ab342f8880a6e290884ea66
---
src/win32/filesystem.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c
index ddeb704..0a2644b 100644
--- a/src/win32/filesystem.c
+++ b/src/win32/filesystem.c
@@ -263,7 +263,10 @@ out:
int vlc_dup (int oldfd)
{
- return dup (oldfd);
+ int fd = dup (oldfd);
+ if (fd != -1)
+ setmode (fd, O_BINARY);
+ return fd;
}
int vlc_pipe (int fds[2])
More information about the vlc-commits
mailing list