Merge pull request #4190 from akallabeth/media_foundation_fix_win7

Removed unused function pointer
This commit is contained in:
Norbert Federa 2017-10-18 10:24:35 +02:00 committed by GitHub
commit c297d84868

View File

@ -115,8 +115,6 @@ typedef HRESULT(__stdcall* pfnMFCreateSample)(IMFSample** ppIMFSample);
typedef HRESULT(__stdcall* pfnMFCreateMemoryBuffer)(DWORD cbMaxLength,
IMFMediaBuffer** ppBuffer);
typedef HRESULT(__stdcall* pfnMFCreateMediaType)(IMFMediaType** ppMFType);
typedef HRESULT(__stdcall* pfnMFCreateDXGIDeviceManager)(UINT* pResetToken,
IMFDXGIDeviceManager** ppDXVAManager);
struct _H264_CONTEXT_MF
{
@ -135,7 +133,6 @@ struct _H264_CONTEXT_MF
pfnMFCreateSample MFCreateSample;
pfnMFCreateMemoryBuffer MFCreateMemoryBuffer;
pfnMFCreateMediaType MFCreateMediaType;
pfnMFCreateDXGIDeviceManager MFCreateDXGIDeviceManager;
};
typedef struct _H264_CONTEXT_MF H264_CONTEXT_MF;
@ -515,12 +512,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
sys->mfplat, "MFCreateMemoryBuffer");
sys->MFCreateMediaType = (pfnMFCreateMediaType) GetProcAddress(sys->mfplat,
"MFCreateMediaType");
sys->MFCreateDXGIDeviceManager = (pfnMFCreateDXGIDeviceManager) GetProcAddress(
sys->mfplat, "MFCreateDXGIDeviceManager");
/**
* Note: MFCreateDXGIDeviceManager is supported starting from Windows 8.
* Don't fail below if GetProcAddress returned NULL.
*/
if (!sys->MFStartup || !sys->MFShutdown || !sys->MFCreateSample
|| !sys->MFCreateMemoryBuffer || !sys->MFCreateMediaType)
goto error;