MFCreateVideoSampleFromSurface C6387 Warning

Alexander Perry 1 Reputation point
2021-07-13T14:51:49.61+00:00

Hi,

The annotation of the first parameter of MFCreateVideoSampleFromSurface is _In_ rather than _In_opt_ and is causing a warning.

The docs say it can be NULL, can this be fixed?

See: https://learn.microsoft.com/en-us/windows/win32/api/evr/nc-evr-mfcreatevideosamplefromsurface

EVRPUBLIC(MFCreateVideoSampleFromSurface)(  
    _In_ IUnknown* pUnkSurface,  
    _Out_ IMFSample** ppSample  
    );  
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,513 questions
{count} votes