Skip to content

Commit

Permalink
prevent closing console right after process error in windows
Browse files Browse the repository at this point in the history
Signed-off-by: yuchenlin <[email protected]>
  • Loading branch information
npes87184 committed Sep 14, 2018
1 parent eca99d5 commit 140b1ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 140b1ef

Please sign in to comment.