Anton Baskanov (@baskanov) commented about dlls/amstream/ddrawstream.c:
LeaveCriticalSection(&stream->cs); return hr; }
old_peer = stream->peer;
IPin_AddRef(old_peer);
IFilterGraph_Disconnect(stream->graph, stream->peer);
IFilterGraph_Disconnect(stream->graph, &stream->IPin_iface);
hr = IFilterGraph_ConnectDirect(stream->graph, old_peer, &stream->IPin_iface, NULL);
if (FAILED(hr))
set_mt_from_desc(&stream->mt, format);
I think it would be better to do this after `IPin_QueryAccept()` returns `S_OK` and call `CopyMediaType()`/`FreeMediaType()` only on the reconnection path.