MoFreeMediaType function (dmort.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The MoFreeMediaType function frees the allocated members of a media type structure.
Syntax
HRESULT MoFreeMediaType(
DMO_MEDIA_TYPE *pmt
);
Parameters
pmt
Pointer to an initialized DMO_MEDIA_TYPE structure.
Return value
Returns an HRESULT value. Possible values include the following.
Return code | Description |
---|---|
|
NULL pointer argument |
|
Success |
Remarks
Call this function to free a format block that was allocated with the MoInitMediaType function. This function frees the pbFormat member of the DMO_MEDIA_TYPE structure and sets pbFormat to NULL. The function does not reset the cbFormat member to zero, however, so if you re-use the DMO_MEDIA_TYPE structure, you should set cbFormat to zero.
Requirements
Target Platform | Windows |
Header | dmort.h (include Dmo.h) |
Library | Msdmo.lib |
DLL | Msdmo.dll |