From cef0689a36acdda6033b169a0a115abfe2cf4c25 Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Wed, 21 Jun 2017 17:40:35 +0200 Subject: [PATCH] ffmpeg-mux: Set error mode to SEM_FAILCRITICALERRORS This prevents spurious dialog boxes appearing, such as "No disk is in the drive" if the application attempts to access an invalid drive. --- plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c b/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c index 56565ede0..c8df627fe 100644 --- a/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c +++ b/plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c @@ -646,6 +646,8 @@ int main(int argc, char *argv[]) #ifdef _WIN32 char **argv; + SetErrorMode(SEM_FAILCRITICALERRORS); + argv = malloc(argc * sizeof(char*)); for (int i = 0; i < argc; i++) { size_t len = wcslen(argv_w[i]);