| Previous | Next |
| MF_E_TIMER_ORPHANED | MF_E_UNSUPPORTED_STATE_TRANSITION |
MF_E_STATE_TRANSITION_PENDING
MF_E_STATE_TRANSITION_PENDING means a state-changing command has not completed when another incompatible transition is requested. Media Foundation transport operations and many source operations complete asynchronously, with the resulting state communicated through events.
Serialize commands by completion events
- After Start, Pause, Stop, or a related operation, wait for the corresponding session or source event before issuing the next dependent transition.
- Attach a monotonically increasing command generation to application state so stale callbacks cannot launch a new command.
- Log both the requested transition and the last completed Media Foundation event; the API return alone does not show which earlier command is still active.
Sleeping and retrying from an arbitrary worker thread hides the race rather than fixing it. The durable solution is an explicit transport state machine driven by asynchronous completion.
Microsoft: controlling presentation states · Microsoft: Media Session event handling
Looking for a different code? Search another status or error code.