sources/mirror: Clamp minimum size to 1x1

This works around an issue in our code with asynchronous or delayed sources.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-01-30 20:49:11 +01:00
parent 188e58bbda
commit b8ff72d6c8

View file

@ -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)