What does HRESULT 0xC00D3E9B (MF_E_MEDIA_SOURCE_WRONGSTATE) mean?

 
Previous Next
MF_E_NOT_PROTECTED MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED

MF_E_MEDIA_SOURCE_WRONGSTATE

MF_E_MEDIA_SOURCE_WRONGSTATE is a media-source lifecycle error. The source object is present, but the requested operation does not fit its current started, paused, stopped, transition, or shutdown-adjacent state.

Trace source events, not just API calls

  • Log MESourceStarted, MESourcePaused, and MESourceStopped together with the command that triggered each transition.
  • Remember that Start, Pause, and Stop are asynchronous; the current state may lag behind the caller's requested state.
  • If a Media Session controls the source, remove direct application calls to the source's transport methods.

This code is broader than MF_E_MEDIA_SOURCE_NOT_STARTED. Before adding retries, identify the exact prior transition and whether its completion event was received. A repeated command from a stale async callback is a common state-machine design defect.

Microsoft: custom media source lifecycle · Microsoft: Media Session source ownership


Looking for a different code? Search another status or error code.