I'm trying to create an aggregate source from two sources - one with 1 video stream and another with 1 audio stream, but get theE_INVALIDARG error. The documentation states that MFCreateAggregateSource returnsE_INVALIDARG if the source collection is empty, but it is definitely not empty. I check its size and iterate over elements right before the call, all are valid sources.
Are there any other cases where MFCreateAggregateSource returnsE_INVALIDARG? Both sources work fine by themselves.