Share via


MoFreeMediaType

 
Microsoft DirectShow 9.0

MoFreeMediaType

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.

Result Code Description
E_POINTER NULL pointer argument
S_OK 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

  Header: Declared in Dmort.h; include Dmo.h
  Library: Msdmo.lib.

See Also