Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
FSREffect: Fixed downscale & validation bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Crowsinc committed Mar 20, 2022
1 parent 1f88d60 commit 0b2040f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LiveVisionKit/OBS/Plugin/Scaling/FSREffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ namespace lvk

// Silently skip if no scaling is needed or any of the sizes are zero. Dont crash
// because there are scenarios where zero sizing is expected or reasonable input.
if(region.size() == output_size || region.area() * input_size.area() * output_size.area() == 0)
if(region.size() == output_size || region.area() == 0 || input_size.area() == 0 || output_size.area() == 0)
obs_source_skip_video_filter(context);

if(obs_source_process_filter_begin(context, GS_RGBA, OBS_NO_DIRECT_RENDERING))
Expand Down Expand Up @@ -153,6 +153,7 @@ namespace lvk
bool FSREffect::validate() const
{
return m_OutputSizeParam != nullptr
&& m_InputSizeParam != nullptr
&& m_RegionUVOffsetParam != nullptr
&& m_EASUParams[0] != nullptr
&& m_EASUParams[1] != nullptr
Expand Down

0 comments on commit 0b2040f

Please sign in to comment.