libobs: Warn/ignore if transitions use get_width/get_height

These functions aren't used with transition sources, and will be
ignored.
This commit is contained in:
jp9000 2016-01-03 18:08:42 -08:00
parent c28cfa556b
commit 03df6b2ceb

View File

@ -564,6 +564,14 @@ void obs_register_source_s(const struct obs_source_info *info, size_t size)
}
if (data.type == OBS_SOURCE_TYPE_TRANSITION) {
if (data.get_width)
source_warn("get_width ignored registering "
"transition '%s'",
data.id);
if (data.get_height)
source_warn("get_height ignored registering "
"transition '%s'",
data.id);
data.output_flags |= OBS_SOURCE_COMPOSITE | OBS_SOURCE_VIDEO |
OBS_SOURCE_CUSTOM_DRAW;
}