Commit 7b11525d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

mft: Rename function pointer.

They collide with the actual functions
parent f4bf662c
...@@ -64,13 +64,13 @@ vlc_module_end() ...@@ -64,13 +64,13 @@ vlc_module_end()
typedef struct typedef struct
{ {
HINSTANCE mfplat_dll; HINSTANCE mfplat_dll;
HRESULT (STDCALL *MFTEnumEx)(GUID guidCategory, UINT32 Flags, HRESULT (STDCALL *fptr_MFTEnumEx)(GUID guidCategory, UINT32 Flags,
const MFT_REGISTER_TYPE_INFO *pInputType, const MFT_REGISTER_TYPE_INFO *pInputType,
const MFT_REGISTER_TYPE_INFO *pOutputType, const MFT_REGISTER_TYPE_INFO *pOutputType,
IMFActivate ***pppMFTActivate, UINT32 *pcMFTActivate); IMFActivate ***pppMFTActivate, UINT32 *pcMFTActivate);
HRESULT (STDCALL *MFCreateSample)(IMFSample **ppIMFSample); HRESULT (STDCALL *fptr_MFCreateSample)(IMFSample **ppIMFSample);
HRESULT (STDCALL *MFCreateMemoryBuffer)(DWORD cbMaxLength, IMFMediaBuffer **ppBuffer); HRESULT (STDCALL *fptr_MFCreateMemoryBuffer)(DWORD cbMaxLength, IMFMediaBuffer **ppBuffer);
HRESULT (STDCALL *MFCreateAlignedMemoryBuffer)(DWORD cbMaxLength, DWORD fAlignmentFlags, IMFMediaBuffer **ppBuffer); HRESULT (STDCALL *fptr_MFCreateAlignedMemoryBuffer)(DWORD cbMaxLength, DWORD fAlignmentFlags, IMFMediaBuffer **ppBuffer);
} MFHandle; } MFHandle;
struct decoder_sys_t struct decoder_sys_t
...@@ -461,13 +461,13 @@ static int AllocateInputSample(decoder_t *p_dec, DWORD stream_id, IMFSample** re ...@@ -461,13 +461,13 @@ static int AllocateInputSample(decoder_t *p_dec, DWORD stream_id, IMFSample** re
if (FAILED(hr)) if (FAILED(hr))
goto error; goto error;
hr = mf->MFCreateSample(&input_sample); hr = mf->fptr_MFCreateSample(&input_sample);
if (FAILED(hr)) if (FAILED(hr))
goto error; goto error;
IMFMediaBuffer *input_media_buffer = NULL; IMFMediaBuffer *input_media_buffer = NULL;
DWORD allocation_size = __MAX(input_info.cbSize, size); DWORD allocation_size = __MAX(input_info.cbSize, size);
hr = mf->MFCreateMemoryBuffer(allocation_size, &input_media_buffer); hr = mf->fptr_MFCreateMemoryBuffer(allocation_size, &input_media_buffer);
if (FAILED(hr)) if (FAILED(hr))
goto error; goto error;
...@@ -518,7 +518,7 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r ...@@ -518,7 +518,7 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r
if ((output_info.dwFlags & expected_flags) != expected_flags) if ((output_info.dwFlags & expected_flags) != expected_flags)
goto error; goto error;
hr = mf->MFCreateSample(&output_sample); hr = mf->fptr_MFCreateSample(&output_sample);
if (FAILED(hr)) if (FAILED(hr))
goto error; goto error;
...@@ -526,9 +526,9 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r ...@@ -526,9 +526,9 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r
DWORD allocation_size = output_info.cbSize; DWORD allocation_size = output_info.cbSize;
DWORD alignment = output_info.cbAlignment; DWORD alignment = output_info.cbAlignment;
if (alignment > 0) if (alignment > 0)
hr = mf->MFCreateAlignedMemoryBuffer(allocation_size, alignment - 1, &output_media_buffer); hr = mf->fptr_MFCreateAlignedMemoryBuffer(allocation_size, alignment - 1, &output_media_buffer);
else else
hr = mf->MFCreateMemoryBuffer(allocation_size, &output_media_buffer); hr = mf->fptr_MFCreateMemoryBuffer(allocation_size, &output_media_buffer);
if (FAILED(hr)) if (FAILED(hr))
goto error; goto error;
...@@ -1060,7 +1060,7 @@ static int FindMFT(decoder_t *p_dec) ...@@ -1060,7 +1060,7 @@ static int FindMFT(decoder_t *p_dec)
MFT_REGISTER_TYPE_INFO input_type = { *p_sys->major_type, *p_sys->subtype }; MFT_REGISTER_TYPE_INFO input_type = { *p_sys->major_type, *p_sys->subtype };
IMFActivate **activate_objects = NULL; IMFActivate **activate_objects = NULL;
UINT32 activate_objects_count = 0; UINT32 activate_objects_count = 0;
hr = mf->MFTEnumEx(category, flags, &input_type, NULL, &activate_objects, &activate_objects_count); hr = mf->fptr_MFTEnumEx(category, flags, &input_type, NULL, &activate_objects, &activate_objects_count);
if (FAILED(hr)) if (FAILED(hr))
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -1092,11 +1092,11 @@ static int LoadMFTLibrary(MFHandle *mf) ...@@ -1092,11 +1092,11 @@ static int LoadMFTLibrary(MFHandle *mf)
if (!mf->mfplat_dll) if (!mf->mfplat_dll)
return VLC_EGENERIC; return VLC_EGENERIC;
mf->MFTEnumEx = (void*)GetProcAddress(mf->mfplat_dll, "MFTEnumEx"); mf->fptr_MFTEnumEx = (void*)GetProcAddress(mf->mfplat_dll, "MFTEnumEx");
mf->MFCreateSample = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateSample"); mf->fptr_MFCreateSample = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateSample");
mf->MFCreateMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateMemoryBuffer"); mf->fptr_MFCreateMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateMemoryBuffer");
mf->MFCreateAlignedMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateAlignedMemoryBuffer"); mf->fptr_MFCreateAlignedMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateAlignedMemoryBuffer");
if (!mf->MFTEnumEx || !mf->MFCreateSample || !mf->MFCreateMemoryBuffer || !mf->MFCreateAlignedMemoryBuffer) if (!mf->fptr_MFTEnumEx || !mf->fptr_MFCreateSample || !mf->fptr_MFCreateMemoryBuffer || !mf->fptr_MFCreateAlignedMemoryBuffer)
return VLC_EGENERIC; return VLC_EGENERIC;
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment