Nikolay Sivov (@nsivov) commented about dlls/mfplat/tests/mfplat.c:
- ok(SUCCEEDED(hr), "failed to set input type, hr %#lx.\n", hr);
- hr = IMFTransform_SetOutputType(xvp, 0, type, 0);
- ok(SUCCEEDED(hr), "failed to set output type, hr %#lx.\n", hr);
- hr = IMFTransform_ProcessMessage(xvp, MFT_MESSAGE_NOTIFY_BEGIN_STREAMING, 0);
- ok(SUCCEEDED(hr), "failed to begin streaming, hr %#lx.\n", hr);
- hr = IMFTransform_GetOutputStreamInfo(xvp, 0, &info);
- ok(SUCCEEDED(hr), "failed to get output stream info, hr %#lx.\n", hr);
- ok(!!(info.dwFlags & MFT_OUTPUT_STREAM_PROVIDES_SAMPLES), "MFT_OUTPUT_STREAM_PROVIDES_SAMPLES expected\n");
- ok(!(info.dwFlags & MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES), "MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES unexpected\n");
- ok(info.cbSize == 4, "output size should be 4\n");
- for (int i = 0; i < 2; i++) {
I would add a helper instead of such loop, that has to check iteration counter to use differing paths.