浏览代码

libobs: Do recursive height/width calls on non-filters

Originally this was programmed to call the recursive height/width
functions if the source type was an input with the intention of not
calling it on filters, but instead of doing that just program it to do
just that: only call the recursive height/width functions if it's not a
filter.
jp9000 10 年之前
父节点
当前提交
ed8998e403
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      libobs/obs-source.c

+ 2 - 2
libobs/obs-source.c

@@ -1507,7 +1507,7 @@ uint32_t obs_source_get_width(obs_source_t *source)
 	if (!data_valid(source, "obs_source_get_width"))
 		return 0;
 
-	return (source->info.type == OBS_SOURCE_TYPE_INPUT) ?
+	return (source->info.type != OBS_SOURCE_TYPE_FILTER) ?
 		get_recurse_width(source) :
 	        get_base_width(source);
 }
@@ -1517,7 +1517,7 @@ uint32_t obs_source_get_height(obs_source_t *source)
 	if (!data_valid(source, "obs_source_get_height"))
 		return 0;
 
-	return (source->info.type == OBS_SOURCE_TYPE_INPUT) ?
+	return (source->info.type != OBS_SOURCE_TYPE_FILTER) ?
 		get_recurse_height(source) :
 		get_base_height(source);
 }