|
@@ -771,12 +771,15 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
|
|
|
}
|
|
|
|
|
|
const char *error = obs_output_get_last_error(streamOutput);
|
|
|
- bool has_last_error = error && *error;
|
|
|
+ bool hasLastError = error && *error;
|
|
|
+ if (hasLastError)
|
|
|
+ lastError = error;
|
|
|
+ else
|
|
|
+ lastError = string();
|
|
|
|
|
|
- blog(LOG_WARNING, "Stream output type '%s' failed to start!%s%s",
|
|
|
- type,
|
|
|
- has_last_error ? " Last Error: " : "",
|
|
|
- has_last_error ? error : "");
|
|
|
+ blog(LOG_WARNING, "Stream output type '%s' failed to start!%s%s", type,
|
|
|
+ hasLastError ? " Last Error: " : "",
|
|
|
+ hasLastError ? error : "");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -1561,12 +1564,15 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
|
|
|
}
|
|
|
|
|
|
const char *error = obs_output_get_last_error(streamOutput);
|
|
|
- bool has_last_error = error && *error;
|
|
|
+ bool hasLastError = error && *error;
|
|
|
+ if (hasLastError)
|
|
|
+ lastError = error;
|
|
|
+ else
|
|
|
+ lastError = string();
|
|
|
|
|
|
- blog(LOG_WARNING, "Stream output type '%s' failed to start!%s%s",
|
|
|
- type,
|
|
|
- has_last_error ? " Last Error: " : "",
|
|
|
- has_last_error ? error : "");
|
|
|
+ blog(LOG_WARNING, "Stream output type '%s' failed to start!%s%s", type,
|
|
|
+ hasLastError ? " Last Error: " : "",
|
|
|
+ hasLastError ? error : "");
|
|
|
return false;
|
|
|
}
|
|
|
|