Nikolay Sivov (@nsivov) commented about dlls/mf/session.c:
switch (topo_node->type) { case MF_TOPOLOGY_OUTPUT_NODE: - if (!topo_node->u.sink.allocator) - return S_OK; - if (SUCCEEDED(hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(topo_node->u.sink.allocator))) - hr = IMFVideoSampleAllocator_InitializeSampleAllocator(topo_node->u.sink.allocator, 4, media_type); + if (topo_node->u.sink.allocator) + { + if (SUCCEEDED(hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(topo_node->u.sink.allocator))) + hr = IMFVideoSampleAllocator_InitializeSampleAllocator(topo_node->u.sink.allocator, 4, media_type); + } + if (SUCCEEDED(hr)) + hr = sink_node_update_input_type(topo_node, media_type); return hr;
Would it make sense to first update the type and then reinitialize allocator, if type update succeeded? Allocator is normally our code, while sink could be generally anything. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8933#note_118863