[x265] [PATCH] disable SIGPIPE on Windows platform

chen chenm003 at 163.com
Tue Apr 14 09:34:22 CEST 2015


need modify _MSC_VER to _WIN32 for Mingw compatible


在 2015-04-14 15:18:54,"Deepthi Nandakumar" <deepthi at multicorewareinc.com> 写道:

Thanks, pushed.



On Tue, Apr 14, 2015 at 11:22 AM, Xinyue Lu <maillist at 7086.in> wrote:
在 2015/4/13 22:41, Min Chen 写道:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1428990100 -28800
> # Node ID 4987a630b0d12638c1994afc7c21b9bc44282498
> # Parent  abfbfdf724a0b224ba5e98c55e81cc9ed295c2f9
> disable SIGPIPE on Windows platform
> ---
>  source/output/reconplay.cpp |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff -r abfbfdf724a0 -r 4987a630b0d1 source/output/reconplay.cpp
> --- a/source/output/reconplay.cpp     Mon Apr 13 14:13:19 2015 -0700
> +++ b/source/output/reconplay.cpp     Tue Apr 14 13:41:40 2015 +0800
> @@ -39,17 +39,21 @@
>
>  bool ReconPlay::pipeValid;
>
> +#ifndef _MSC_VER

It still fails on mingw. Changing condition to check _WIN32 seems to work.


>  static void sigpipe_handler(int)
>  {
>      if (ReconPlay::pipeValid)
>          general_log(NULL, "exec", X265_LOG_ERROR, "pipe closed\n");
>      ReconPlay::pipeValid = false;
>  }
> +#endif
>
>  ReconPlay::ReconPlay(const char* commandLine, x265_param& param)
>  {
> +#ifndef _MSC_VER
>      if (signal(SIGPIPE, sigpipe_handler) == SIG_ERR)
>          general_log(&param, "exec", X265_LOG_ERROR, "Unable to register SIGPIPE handler: %s\n", strerror(errno));
> +#endif
>
>      width = param.sourceWidth;
>      height = param.sourceHeight;
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
_______________________________________________
x265-devel mailing list
x265-devel at videolan.org
https://mailman.videolan.org/listinfo/x265-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150414/76cf0e5f/attachment.html>


More information about the x265-devel mailing list