On Fri Apr 21 06:57:52 2023 +0000, Ziqing Hui wrote:
There is a problem: if we don't delay create sink object, I don't know how to create it during writer initialization. Take WAVE as example: we use IMFSinkClassFactory_CreateMediaSink() to create sink object, and IMFSinkClassFactory_CreateMediaSink() calls MFCreateWAVEMediaSink(). However, we must pass a valid media type argument to MFCreateWAVEMediaSink(), or this function fails. See tests here: https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/mfsrcsnk/tests/mfsrcs... What I mean is, after patch 2, we are still not able to successfully create WAV writter sink. Because for now, we pass a NULL media type to MFCreateWAVEMediaSink().
I see. Let's drop the tests entirely then, and have the fix as is. Delayed creation logic we can have later as a separate MR.