diff --git a/vstools/enums/stubs.py b/vstools/enums/stubs.py index 28a6230..37fe6e8 100644 --- a/vstools/enums/stubs.py +++ b/vstools/enums/stubs.py @@ -177,7 +177,8 @@ def _base_from_video( if isinstance(src, vs.FrameProps): raise exception('Can\'t determine {class_name} from FrameProps.', func, class_name=cls) - return cls.from_res(src) + if all(hasattr(src, x) for x in ('width', 'height')): + return cls.from_res(src) return cls(value)