This is weird because in Visual Studio, if you do Go To Definition on this call to Set() it leads you to Set(..., Variant), which should be the one to call, but if you inspect the SharpDX.MediaFoundation.dll assembly in Just Decompiles then it clearly shows that the method invokes itself (Set{ComObject} is called).
With v4.1.0 the MediaAttributes.Set method causes a stack overflow when given a ComObject or a subclass of ComObject: line 280 https://github.com/sharpdx/SharpDX/blob/bdb12ec420d2b6ff32da184453c722380596ceb8/Source/SharpDX.MediaFoundation/MediaAttributes.cs#L280 calls itself.
This is weird because in Visual Studio, if you do Go To Definition on this call to Set() it leads you to Set(..., Variant), which should be the one to call, but if you inspect the SharpDX.MediaFoundation.dll assembly in Just Decompiles then it clearly shows that the method invokes itself (Set{ComObject} is called).