From e2ee864825442d103d9701db065352c07eddfc19 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 31 Oct 2019 06:27:01 +0100 Subject: [PATCH] encoder: Fix width and height to use rescaled resolution The function video_output_get_info does not contain rescaling information from the output tab, so by replacing it with obs_encoder_get_width/height we can actually use the scaled resolution. --- source/encoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/encoder.cpp b/source/encoder.cpp index 4a79c62..c5f6a8c 100644 --- a/source/encoder.cpp +++ b/source/encoder.cpp @@ -621,8 +621,8 @@ void obsffmpeg::encoder::initialize_sw(obs_data_t* settings) } } - _context->width = voi->width; - _context->height = voi->height; + _context->width = static_cast(obs_encoder_get_width(_self)); + _context->height = static_cast(obs_encoder_get_height(_self)); ffmpeg::tools::setup_obs_color(voi->colorspace, voi->range, _context); _context->pix_fmt = _pixfmt_target; -- 2.52.0