提交 a23d8e3f 编写于 作者: J jp9000

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.
上级 215f2441
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册