Skip to content

Commit

Permalink
Merge pull request #21 from stream-labs/fix-rescale
Browse files Browse the repository at this point in the history
Do not reset the video context when rescaling
  • Loading branch information
eddyStreamlabs authored Jan 25, 2018
2 parents 99ad771 + a504301 commit aa75cc4
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/nodeobs_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,28 +858,6 @@ bool OBS_service::resetVideoContext(const char* outputType)
ovi.output_width = (uint32_t)config_get_uint(basicConfig, "Video", "OutputCX");
ovi.output_height = (uint32_t)config_get_uint(basicConfig, "Video", "OutputCY");

if(strcmp(outputMode, "Advanced") == 0 && outputType != NULL) {
if(strcmp(outputType, "Stream") == 0) {
bool doRescale = config_get_bool(basicConfig, "AdvOut", "Rescale");
if(doRescale) {
const char* rescaleRes = config_get_string(basicConfig, "AdvOut", "RescaleRes");
if (rescaleRes == NULL) {
rescaleRes = "1280x720";
}
sscanf(rescaleRes, "%ux%u", &ovi.output_width, &ovi.output_height);
}
} else if (strcmp(outputType, "Record") == 0) {
bool doRescale = config_get_bool(basicConfig, "AdvOut", "RecRescale");
if(doRescale) {
const char* recRescaleRes = config_get_string(basicConfig, "AdvOut", "RecRescaleRes");
if (recRescaleRes == NULL) {
recRescaleRes = "1280x720";
}
sscanf(recRescaleRes, "%ux%u", &ovi.output_width, &ovi.output_height);
}
}
}

std::vector<Screen> resolutions = OBS_API::availableResolutions();

if (ovi.base_width == 0 || ovi.base_height == 0) {
Expand Down

0 comments on commit aa75cc4

Please sign in to comment.