[FFmpeg-devel] [PATCH] Support Ctrl+Break in ffmpeg.exe on Windows as if it was Ctrl+C

Roger Pack rogerdpack2 at gmail.com
Wed Jul 1 00:33:35 CEST 2015


On 6/30/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Jun 30, 2015 at 01:00:22PM -0600, Roger Pack wrote:
>> On 6/30/15, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Mon, Jun 29, 2015 at 11:09:14PM -0600, Roger Pack wrote:
>>
>> > [...]
>>
>> >> +            Sleep(0);
>>
>> >
>>
>> > the funky line ending is here
>>
>> OK try this one.
>> thanks!
>
>>  configure |    2 ++
>>  ffmpeg.c  |   41 +++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 43 insertions(+)
>> ff3f339e550dc83d300346ec648f778f85900679
>> 0001-windows-respond-to-logoff-and-ctrl-break-messages-as.patch
>> From 7ce401dbd16873928bd541d5d567208963b85889 Mon Sep 17 00:00:00 2001
>> From: rogerdpack <rogerpack2005 at gmail.com>
>> Date: Tue, 30 Jun 2015 12:58:43 -0600
>> Subject: [PATCH] windows: respond to logoff and ctrl+break messages as
>> well
>>
>> Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>
>> ---
>>  configure |  2 ++
>>  ffmpeg.c  | 41 +++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 43 insertions(+)
>>
>> diff --git a/configure b/configure
>> index 89b5668..cc23991 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1787,6 +1787,7 @@ SYSTEM_FUNCS="
>>      pthread_cancel
>>      sched_getaffinity
>>      SetConsoleTextAttribute
>> +    SetConsoleCtrlHandler
>>      setmode
>>      setrlimit
>>      Sleep
>> @@ -4990,6 +4991,7 @@ check_func_headers windows.h
>> GetSystemTimeAsFileTime
>>  check_func_headers windows.h MapViewOfFile
>>  check_func_headers windows.h PeekNamedPipe
>>  check_func_headers windows.h SetConsoleTextAttribute
>> +check_func_headers windows.h SetConsoleCtrlHandler
>>  check_func_headers windows.h Sleep
>>  check_func_headers windows.h VirtualAlloc
>>  check_struct windows.h "CONDITION_VARIABLE" Ptr
>> diff --git a/ffmpeg.c b/ffmpeg.c
>> index aac03bb..b58d891 100644
>> --- a/ffmpeg.c
>> +++ b/ffmpeg.c
>> @@ -79,6 +79,10 @@
>>  #include <windows.h>
>>  #include <psapi.h>
>>  #endif
>> +#ifdef HAVE_SETCONSOLECTRLHANDLER
> [...]
>> +#ifdef HAVE_SETCONSOLECTRLHANDLER
>
> they are defined but to 0 on linux, this needs #if

OK see attached, thanks.
-roger-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-windows-respond-to-logoff-and-ctrl-break-messages-as.patch
Type: application/octet-stream
Size: 3200 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150630/9ade689c/attachment.obj>


More information about the ffmpeg-devel mailing list