obs-filters: Fix scroll filter offsets becoming non-finite
If the parent source of a scroll filter has a 0 width or 0 height, the scroll filter would do a division by zero on the size_i variable, which would then cause the offset variable to perpetually have a non-finite value, thus preventing the scroll filter from rendering properly after that due to the non-finite offset value being uploaded to the shader.
This commit is contained in:
parent
215f2441e2
commit
a23d8e3f2c
@ -166,7 +166,7 @@ static void scroll_filter_render(void *data, gs_effect_t *effect)
|
||||
cx = filter->limit_cx ? filter->cx : base_cx;
|
||||
cy = filter->limit_cy ? filter->cy : base_cy;
|
||||
|
||||
if (cx && cy) {
|
||||
if (base_cx && base_cy) {
|
||||
vec2_set(&filter->size_i,
|
||||
1.0f / (float)base_cx,
|
||||
1.0f / (float)base_cy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user