From 066d3dfbcbf87e97e4b25038891533bb283f983f Mon Sep 17 00:00:00 2001 From: yuchenlin Date: Sat, 8 Sep 2018 09:16:04 +0800 Subject: [PATCH] prevent closing console right after process error in windows Signed-off-by: yuchenlin --- app/src/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main.c b/app/src/main.c index 634c7bb4..1322dee2 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -319,5 +319,10 @@ int main(int argc, char *argv[]) { avformat_network_deinit(); // ignore failure +#if defined (__WINDOWS__) && ! defined (WINDOWS_NOCONSOLE) + if (res != 0) { + system("pause"); + } +#endif return res; }