Просмотр исходного кода

obs-filters: Skip scroll filter if parent has no cx/cy

There's no point in the filter continuing its processing if there's
nothing to draw.
jp9000 9 лет назад
Родитель
Сommit
5349bbf633
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      plugins/obs-filters/scroll-filter.c

+ 2 - 0
plugins/obs-filters/scroll-filter.c

@@ -172,6 +172,8 @@ static void scroll_filter_render(void *data, gs_effect_t *effect)
 				1.0f / (float)base_cy);
 				1.0f / (float)base_cy);
 	} else {
 	} else {
 		vec2_zero(&filter->size_i);
 		vec2_zero(&filter->size_i);
+		obs_source_skip_video_filter(filter->context);
+		return;
 	}
 	}
 
 
 	vec2_set(&mul_val,
 	vec2_set(&mul_val,