From b8ff72d6c8e0ed5606a87d12c950fbb6eb180de3 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 30 Jan 2021 20:49:11 +0100 Subject: [PATCH] sources/mirror: Clamp minimum size to 1x1 This works around an issue in our code with asynchronous or delayed sources. --- source/sources/source-mirror.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sources/source-mirror.cpp b/source/sources/source-mirror.cpp index 9efef4e3..5ff79624 100644 --- a/source/sources/source-mirror.cpp +++ b/source/sources/source-mirror.cpp @@ -85,12 +85,12 @@ mirror_instance::~mirror_instance() uint32_t mirror_instance::get_width() { - return _source_size.first; + return _source_size.first ? _source_size.first : 1; } uint32_t mirror_instance::get_height() { - return _source_size.second; + return _source_size.second ? _source_size.second : 1; } void mirror_instance::load(obs_data_t* data)