diff --git a/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/Presenter.cpp b/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/Presenter.cpp index 00292d39..f32ae940 100644 --- a/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/Presenter.cpp +++ b/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/Presenter.cpp @@ -1409,7 +1409,8 @@ HRESULT EVRCustomPresenter::CreateOptimalVideoType(IMFMediaType* pProposedType, // Helper object to manipulate the optimal type. VideoType mtOptimal; - + mtOptimal.CreateEmptyType(); + // Clone the proposed type. CHECK_HR(hr = mtOptimal.CopyFrom(pProposedType)); @@ -2415,4 +2416,4 @@ HRESULT SetMixerSourceRect(IMFTransform *pMixer, const MFVideoNormalizedRect& nr return hr; } -#pragma warning( pop ) \ No newline at end of file +#pragma warning( pop ) diff --git a/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/dllmain.cpp b/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/dllmain.cpp index c37a09f4..4af5c668 100644 --- a/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/dllmain.cpp +++ b/Samples/Win7Samples/multimedia/mediafoundation/evrpresenter/dllmain.cpp @@ -65,6 +65,11 @@ BOOL APIENTRY DllMain( HANDLE hModule, return TRUE; } +STDAPI CreateEVRCustomPresenter(REFIID riid, void** ppvObject) +{ + return EVRCustomPresenter::CreateInstance(NULL, riid, ppvObject); +} + STDAPI DllCanUnloadNow() { if (!ClassFactory::IsLocked())