diff options
author | Martin Storsjö <martin@martin.st> | 2023-10-22 14:03:29 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2023-10-23 13:08:39 +0300 |
commit | ff5a3575fec2d49d5fae4ec1198a939e203314db (patch) | |
tree | 3fb28a138ee0fa005959ec3dd5b9a2b8cce28a3b | |
parent | 1762975ba184f4ca84decb2342f60fabaa199962 (diff) | |
download | ffmpeg-ff5a3575fec2d49d5fae4ec1198a939e203314db.tar.gz |
fftools: Check HAVE_GETSTDHANDLE before using GetStdHandle
GetStdHandle is unavailable outside of the desktop API subset.
This didn't use to be a problem with earlier WinSDKs, as kbhit also
used to be available only for desktop apps, and this whole section is
wrapped in #if HAVE_KBHIT. With newer WinSDKs, kbhit() is available also
for non-desktop apps, while GetStdHandle still isn't.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | fftools/ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 7c33b56cd3..46a85b41a8 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -308,7 +308,7 @@ static int read_key(void) return n; } #elif HAVE_KBHIT -# if HAVE_PEEKNAMEDPIPE +# if HAVE_PEEKNAMEDPIPE && HAVE_GETSTDHANDLE static int is_pipe; static HANDLE input_handle; DWORD dw, nchars; |