On Tue Mar 11 09:30:05 2025 +0000, Ziqing Hui wrote:
I just did a tests on win10 with these minutes ago:
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 53f22809dc4..2514ffc5160 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -5959,6 +5959,8 @@ static void test_mpeg4_media_sink(void) /* Test adding and removing stream sink. */ if (!(flags & MEDIASINK_FIXED_STREAMS)) { + hr = IMFMediaSink_AddStreamSink(sink, 123, NULL, &stream_sink); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaSink_AddStreamSink(sink, 123, video_type, &stream_sink); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFStreamSink_Release(stream_sink);
It will crash the tests. So I think it is not allowed.
Sounds good, I think we can just assume it's not NULL in steam_sink_create, we don't even need to return an error but let's remove the `if (media_type)` (and similar change in Release and probably in stream_sink_type_handler_GetCurrentMediaType).