[vlc-commits] mft: Rename function pointer.
Hugo Beauzée-Luyssen
git at videolan.org
Fri Nov 21 17:36:51 CET 2014
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Nov 21 13:11:16 2014 +0100| [7b11525daddacd6a62532f0dcc4eaf132f7bc395] | committer: Hugo Beauzée-Luyssen
mft: Rename function pointer.
They collide with the actual functions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b11525daddacd6a62532f0dcc4eaf132f7bc395
---
modules/codec/mft.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/modules/codec/mft.c b/modules/codec/mft.c
index 279af12..4777e8b 100644
--- a/modules/codec/mft.c
+++ b/modules/codec/mft.c
@@ -64,13 +64,13 @@ vlc_module_end()
typedef struct
{
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 *pOutputType,
IMFActivate ***pppMFTActivate, UINT32 *pcMFTActivate);
- HRESULT (STDCALL *MFCreateSample)(IMFSample **ppIMFSample);
- HRESULT (STDCALL *MFCreateMemoryBuffer)(DWORD cbMaxLength, IMFMediaBuffer **ppBuffer);
- HRESULT (STDCALL *MFCreateAlignedMemoryBuffer)(DWORD cbMaxLength, DWORD fAlignmentFlags, IMFMediaBuffer **ppBuffer);
+ HRESULT (STDCALL *fptr_MFCreateSample)(IMFSample **ppIMFSample);
+ HRESULT (STDCALL *fptr_MFCreateMemoryBuffer)(DWORD cbMaxLength, IMFMediaBuffer **ppBuffer);
+ HRESULT (STDCALL *fptr_MFCreateAlignedMemoryBuffer)(DWORD cbMaxLength, DWORD fAlignmentFlags, IMFMediaBuffer **ppBuffer);
} MFHandle;
struct decoder_sys_t
@@ -461,13 +461,13 @@ static int AllocateInputSample(decoder_t *p_dec, DWORD stream_id, IMFSample** re
if (FAILED(hr))
goto error;
- hr = mf->MFCreateSample(&input_sample);
+ hr = mf->fptr_MFCreateSample(&input_sample);
if (FAILED(hr))
goto error;
IMFMediaBuffer *input_media_buffer = NULL;
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))
goto error;
@@ -518,7 +518,7 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r
if ((output_info.dwFlags & expected_flags) != expected_flags)
goto error;
- hr = mf->MFCreateSample(&output_sample);
+ hr = mf->fptr_MFCreateSample(&output_sample);
if (FAILED(hr))
goto error;
@@ -526,9 +526,9 @@ static int AllocateOutputSample(decoder_t *p_dec, DWORD stream_id, IMFSample **r
DWORD allocation_size = output_info.cbSize;
DWORD alignment = output_info.cbAlignment;
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
- hr = mf->MFCreateMemoryBuffer(allocation_size, &output_media_buffer);
+ hr = mf->fptr_MFCreateMemoryBuffer(allocation_size, &output_media_buffer);
if (FAILED(hr))
goto error;
@@ -1060,7 +1060,7 @@ static int FindMFT(decoder_t *p_dec)
MFT_REGISTER_TYPE_INFO input_type = { *p_sys->major_type, *p_sys->subtype };
IMFActivate **activate_objects = NULL;
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))
return VLC_EGENERIC;
@@ -1092,11 +1092,11 @@ static int LoadMFTLibrary(MFHandle *mf)
if (!mf->mfplat_dll)
return VLC_EGENERIC;
- mf->MFTEnumEx = (void*)GetProcAddress(mf->mfplat_dll, "MFTEnumEx");
- mf->MFCreateSample = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateSample");
- mf->MFCreateMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateMemoryBuffer");
- mf->MFCreateAlignedMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateAlignedMemoryBuffer");
- if (!mf->MFTEnumEx || !mf->MFCreateSample || !mf->MFCreateMemoryBuffer || !mf->MFCreateAlignedMemoryBuffer)
+ mf->fptr_MFTEnumEx = (void*)GetProcAddress(mf->mfplat_dll, "MFTEnumEx");
+ mf->fptr_MFCreateSample = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateSample");
+ mf->fptr_MFCreateMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateMemoryBuffer");
+ mf->fptr_MFCreateAlignedMemoryBuffer = (void*)GetProcAddress(mf->mfplat_dll, "MFCreateAlignedMemoryBuffer");
+ if (!mf->fptr_MFTEnumEx || !mf->fptr_MFCreateSample || !mf->fptr_MFCreateMemoryBuffer || !mf->fptr_MFCreateAlignedMemoryBuffer)
return VLC_EGENERIC;
return VLC_SUCCESS;
More information about the vlc-commits
mailing list