From a23d8e3f2cb25bd0d0e9623b3cc3ac4d7b9bc32e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 23 Apr 2016 14:35:25 -0700 Subject: [PATCH] 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. --- plugins/obs-filters/scroll-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/obs-filters/scroll-filter.c b/plugins/obs-filters/scroll-filter.c index fa7e40ab5..5033c2017 100644 --- a/plugins/obs-filters/scroll-filter.c +++ b/plugins/obs-filters/scroll-filter.c @@ -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);