[x265] [PATCH] fix output to pipe on Windows
Ashok Kumar Mishra
ashok at multicorewareinc.com
Wed Feb 14 08:43:58 CET 2018
On Sat, Feb 10, 2018 at 10:49 AM, Ma0 <mateuszb at poczta.onet.pl> wrote:
> # HG changeset patch
> # User Ma0 <mateuszb at poczta.onet.pl>
> # Date 1518239805 -3600
> # Sat Feb 10 06:16:45 2018 +0100
> # Node ID c4d56ef3611d3c157ce81241b655e953d58308f2
> # Parent 1949157705cef7e6e97df116e2f71636f4cb0025
> fix output to pipe on Windows
>
> diff -r 1949157705ce -r c4d56ef3611d source/output/raw.cpp
> --- a/source/output/raw.cpp Wed Jan 31 19:44:19 2018 +0530
> +++ b/source/output/raw.cpp Sat Feb 10 06:16:45 2018 +0100
> @@ -24,6 +24,14 @@
>
> #include "raw.h"
>
> +#if _WIN32
> +#include <io.h>
> +#include <fcntl.h>
> +#if defined(_MSC_VER)
> +#pragma warning(disable: 4996) // POSIX setmode and fileno deprecated
> +#endif
> +#endif
> +
> using namespace X265_NS;
> using namespace std;
>
> @@ -33,6 +41,9 @@
> if (!strcmp(fname, "-"))
> {
> ofs = stdout;
> +#if _WIN32
> + setmode(fileno(stdout), O_BINARY);
> +#endif
> return;
> }
> ofs = x265_fopen(fname, "wb");
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
Thanks. Pushed to default.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180214/38bf781e/attachment.html>
More information about the x265-devel
mailing list