Memory allocators manage fixed number of media samples. When all media samples are given away, GetBuffer
blocks until some media sample gets back availalble.
In you particular case, you have ONE media sample in the allocator and you do not do properly release the COM interface, hence it never gets back availalble, and you get infinite lock.
m_pInputPin->Receive(outsample);
outsample->Release(); // <<--- Here is the missing thing