Search code examples
ms-media-foundation

AMDh264Encoder returning MF_E_ATTRIBUTENOTFOUND when checking MFSampleExtension_CleanPoint


When receiving an output from IMFTransform::ProcessOutput, calling GetUINT32(MFSampleExtension_CleanPoint) on the sample fails and returns MF_E_ATTRIBUTENOTFOUND only while using the AMDh264Encoder (NV12 in, H264 out), as such there are no keyframes in the final output video so it is corrupted.

What causes getting attribute MFSampleExtension_CleanPoint MF_E_ATTRIBUTENOTFOUND to fail, only on the AMDh264Encoder?


Solution

  • Video encoder MFTs are supplied by hardware vendors. AMD does "AMDh264Encoder" for their hardware and introduces it with their video drivers, in particular.

    For this reason implementations from different vendors have slight differences, AMD guys decided to not set this attributes on produced media samples.

    You should skip this gracefully and treat the attribute as optional.