What should Asynchronous MFTs return for ProcessOutput just after a FLUSH command? RRS feed

  • Question

  • http://msdn.microsoft.com/en-us/library/dd317909(v=VS.85).aspx

    According to the MSDN, asynchronous MFTs should return E_UNEXPECTED if ProcessOutput is called unexpectedly.

    However, our MFT receives a ProcessOutput call after it drops all samples by a ProcessMessage call with MFT_MESSAGE_COMMAND_FLUSH.

    If the MFT returns E_UNEXPECTED, the playback completely stops. How should the MFT handle this case?

    Should it return S_OK without a sample? (If it provides samples.)


    The sequence is as below.


    1.       The MFT issues METransformHaveOutput.

    2.       The client calls ProcessOutput and the MFT return S_OK with a MFSample.

    3.       Loop 1&2…….

    4.       The MFT issues METransformHaveOutput.

    5.       The client sent MFT_MESSAGE_COMMAND_FLUSH and then the MFT drop samples.

    6.       The client calls ProcessOutput which seems a counterpart of Step 4 and the MFT returns E_UNEXPECTED because it doesn’t have any output sample.

    7.       Then a MFSession receives error event.


    Friday, August 6, 2010 2:20 AM


  • I believe we covered this over email, but this might be useful to other people as well.  To work around this issue, return S_OK from ProcessOutput and set the MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE flag on the dwStatus member of each MFT_OUTPUT_DATA_BUFFER.
    • Marked as answer by kekana Wednesday, September 1, 2010 1:05 AM
    Friday, August 27, 2010 6:38 PM