DirectShow IVMRSurfaceAllocator9 (YUV Mixing) DirectX Lost Device
===

I use a custom IVMRSurfaceAllocator9 to render a video from DirectShow in a DirectX9 application. I have been trying to handle a lost device for my DirectX Device instance (for when the HDMI is [un]plugged in). I release all my DX Device dependent resources (Textures, Surfaces, etc), reset the DX Device then reload those resources. I do that just fine, everything starts rendering again (expect the video); when it comes to the custom IVMRSurfaceAlloctor9 I am having problems. I have tried three different things.

Every single time, the video would just be black (or any other color I cleared the surface(s) to)

Followed MSDN docs:
(http://msdn.microsoft.com/en-us/library/windows/desktop/dd407172(v=vs.85).aspx)
I did every step on that page, at first I wasn't using the IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper to create the surface(s); but I switched to using it as well with no result.
When I call IVMRSurfaceAllocatorNotify9::ChangeD3DDevice, it would call the IVMRSurfaceAllocator9::InitializeDevice. I'd recreate the surfaces, all was good. It then started calling IVMRSurfaceAllocator9::GetSurface, and IVMRSurfaceAllocator9::PresentImage with correct parameters just like it did before the lost device and reset

Google Findings:
(http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.directx.video/2007-06/msg00127.html)
I found a few posts saying to disconnect the pins from the source filter and VMR9 filters, and then reconnect them. I did just that with the same results as before. I even went a step further and I completely removed the VMR9 filter, disposed of it and created a new one to put in it's place with the same results.

GraphEdit:
After many ideas, I ended up starting to think the video decoders could be serving up blank images (as this isn't just a normal lost device, I completely lose the display/adapter and have to recreate the DX Device on a new [primary] adapter). So I recreated the DirectShow graph in the WinSDK Graph Edit tool (http://msdn.microsoft.com/en-us/library/windows/desktop/dd407274(v=vs.85).aspx) and force a lost device ([un]plug hdmi) and the VMR9 window handles it just fine; but at the first try I did not setup the VMR mixer settings like I do in the application (using IVMRMixerControl9::SetMixingPrefs). I change the VMR9 filter settings in the Graph Edit tool to do YUV mixing and force a lost device again, and to my dismay the VMR9 window goes black and stays black; the same result as in my application.

After switching my application to RGB mixing, and resetting the DX Device the video is no longer black and continues like nothing ever happened.

So my question is, why in YUV mixing mode can't my custom IVMRSurfaceAllocator9 (nor the default allocator) reinitialize properly after a lost DX Device?