I am trying to decode even just a single H264 frame with the H264 Decoder MFT
, but I've been having problems with ProcessOutput()
. I've reduced the bad HRESULT
's as much as I can, but I'm currently stuck on dealing with MF_E_TRANSFORM_STREAM_CHANGE
. This occurs after I set the pSample equal to my allocated output_sample
and call ProcessOutput()
, since this decoder requires you allocate your own sample. I tried resetting the output type using SetOutputType()
to what I had in my configure_decoder()
function, but alas I get a bad HRESULT. Not sure what to do next.
You just need to follow this at Handling Stream Changes:
- The client calls
IMFTransform::GetOutputAvailableType
. This method returns an updated set of output types.- The client calls
SetOutputType
to set a new output type.- The client resumes calling
ProcessInput
/ProcessOutput
.
In the question body above you are trying to do 3 without doing 2. Most likely your media type is somewhat different from MFT's so it is likely to reject it and it blocks the processing until this is resolved.