From bd78db91e95e7efa5da1e911bd69e6c648b28a33 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 8 Feb 2015 01:11:34 -0800 Subject: [PATCH] UI: Fix encoder rescaling for streaming The "rescale" option for streaming in the advanced output settings was not properly checking the parameter output of sscanf. sscanf returns the number of values that were found, not the number of string matches. --- obs/window-basic-main-outputs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obs/window-basic-main-outputs.cpp b/obs/window-basic-main-outputs.cpp index afbaa511e..602174eb4 100644 --- a/obs/window-basic-main-outputs.cpp +++ b/obs/window-basic-main-outputs.cpp @@ -402,7 +402,7 @@ inline void AdvancedOutput::SetupStreaming() unsigned int cx = 0; unsigned int cy = 0; - if (rescale && sscanf(rescaleRes, "%ux%u", &cx, &cy) != 3) { + if (rescale && sscanf(rescaleRes, "%ux%u", &cx, &cy) != 2) { cx = 0; cy = 0; }