Nikolay Sivov (@nsivov) commented about dlls/mfreadwrite/tests/mfplat.c:
+ /* Test AddStream. */ + init_media_type(stream_type, video_stream_type_desc, -1); + + hr = IMFSinkWriter_AddStream(writer, NULL, NULL); + ok(hr == E_INVALIDARG, "AddStream returned %#lx.\n", hr); + hr = IMFSinkWriter_AddStream(writer, stream_type, NULL); + ok(hr == E_POINTER, "AddStream returned %#lx.\n", hr); + + index = 0xdeadbeef; + hr = IMFSinkWriter_AddStream(writer, NULL, &index); + ok(hr == E_INVALIDARG, "AddStream returned %#lx.\n", hr); + ok(index == 0xdeadbeef, "Unexpected index %lu.\n", index); + + hr = IMFSinkWriter_AddStream(writer, stream_type, &index); + ok(hr == S_OK, "AddStream returned %#lx.\n", hr); + ok(index == 0, "Unexpected index %lu.\n", index); This does not test anything MP4 specific, it's all common code testing encoding pipeline, of which encoders and archive sinks are plugin components. I suggest moving this to test_sink_writer_create() for example.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7160#note_93845