   VMR9 slows down when game is at 60fps
  Before I begin I'de like to say I am using Managed DirectX and C#, but I don't think that affects the problem because C++ programmers also have this problem.Anyways, I have written a custom allocator for my game to display an opening. Previously I just loaded my game engine after I played the video, but that was a workaround and I'de like to use video anytime without shutting down my engine. The problem is all the examples given make Direct3D only render a frame when PresentImage is called by DirectShow and that does not work in a game engine. I tried to implement my own way by making a property called NewFrameReady, which is checked when the Update command in my engine is called and if true it'll take a frame already stored. Now, my game runs at 60 fps when the window is in focus but slows down to about 30 when the window is out of focus.  The problem is whenever the game is running at 60 fps, the video is extremely slow and choppy, but when it runs at 30 fps, it's great. So I am wondering if anyone has any ideas as to what is wrong. At this moment I think it a problem between DirectShow and Direct3D sharing the same device, but I don't know how to change it to fix that.Thanks in advance.   