From 140b1ef6a5f2de489f99c6f7f63dc2a49bc404f6 Mon Sep 17 00:00:00 2001 From: yuchenlin Date: Fri, 14 Sep 2018 20:34:59 +0800 Subject: [PATCH] prevent closing console right after process error in windows Signed-off-by: yuchenlin --- app/src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main.c b/app/src/main.c index 634c7bb4..e1d6782e 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -319,5 +319,11 @@ int main(int argc, char *argv[]) { avformat_network_deinit(); // ignore failure +#if defined (__WINDOWS__) && ! defined (WINDOWS_NOCONSOLE) + if (res != 0) { + fprintf(stderr, "Press any key to continue...\n"); + getchar(); + } +#endif return res; }