GetNativeVideoSize returns different value when called multiple times

I'm using IVMRWindowlessControl9 to display videos in my DX app.

The first time through, everything seems to go fine. If I run through the exact same code again, it still seems to work ok. However...my application is more complicated than that so it has to do other things with shaders and direct 3d etc. etc. Later on, I return to the exact same piece of DirectShow code with the same window, the same video. The interfaces seem to initialize correctly. The calls to set the clipping window, set the rendering mode (windowless), all seem to return S_OK.

However, when I get to the GetNativeVideoSize on the WindowlessControl interface, the width, height and aspect w/h return 0, 0, 0, 0.

When this occurs, I also get the Active Movie window to appear when the media control interface eventually calls Run - even though the Set Rendering Mode seemed to work just a few lines of code ago.

Any ideas?

[966 byte] By [Algernon] at [2007-12-24]

Software Development for Windows Vista

Site Classified