|
|
@@ -2692,6 +2692,9 @@ static inline enum video_format GetVideoFormatFromName(const char *name)
|
|
|
|
|
|
int OBSBasic::ResetVideo()
|
|
|
{
|
|
|
+ if (outputHandler && outputHandler->Active())
|
|
|
+ return OBS_VIDEO_CURRENTLY_ACTIVE;
|
|
|
+
|
|
|
ProfileScope("OBSBasic::ResetVideo");
|
|
|
|
|
|
struct obs_video_info ovi;
|
|
|
@@ -2742,6 +2745,12 @@ int OBSBasic::ResetVideo()
|
|
|
|
|
|
ret = AttemptToResetVideo(&ovi);
|
|
|
if (IS_WIN32 && ret != OBS_VIDEO_SUCCESS) {
|
|
|
+ if (ret == OBS_VIDEO_CURRENTLY_ACTIVE) {
|
|
|
+ blog(LOG_WARNING, "Tried to reset when "
|
|
|
+ "already active");
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
/* Try OpenGL if DirectX fails on windows */
|
|
|
if (astrcmpi(ovi.graphics_module, DL_OPENGL) != 0) {
|
|
|
blog(LOG_WARNING, "Failed to initialize obs video (%d) "
|