| Previous | Next |
| NS_S_WMG_ADVISE_DROP_FRAME | NS_S_NEED_TO_BUY_BURN_RIGHTS |
NS_S_WMG_ADVISE_DROP_TO_KEYFRAME
Windows Media advises dropping through the next key frame
NS_S_WMG_ADVISE_DROP_TO_KEYFRAME is HRESULT 856167 (0x000D1067) from Windows Media. AllStat describes it as “The timestamp is severely late compared to the current render position; Advise dropping everything up to the next key frame.” The severity bit indicates a nonfailure result, but the value carries a specific condition that must not be collapsed into plain S_OK.
In the legacy Windows Media pipeline or Player state, this result means that the timestamp is severely late compared to the current render position; Advise dropping everything up to the next key frame. Ordinary completion must not be inferred from it until the owning component’s state and outputs agree.
Where the status is encountered
- Windows Media source, reader, writer, or renderer callbacks; log the exact method and object state instead of interpreting the constant outside that contract.
- Windows Media Player SDK automation; log the exact method and object state instead of interpreting the constant outside that contract.
- Media graph, playlist, image, rights, or buffering state; log the exact method and object state instead of interpreting the constant outside that contract.
Because it is informational, a language binding may expose it as success and hide the symbolic distinction. Keep the original HRESULT available until the code-specific branch has run.
Evidence and telemetry
- preserve current frame and next key-frame timestamps.
- preserve codec and GOP structure.
- preserve skipped frame count.
- preserve decoder reset state.
- preserve resulting synchronization offset.
Also record ns_s_wmg_advise_drop_to_keyframe_operation, ns_s_wmg_advise_drop_to_keyframe_state_before, ns_s_wmg_advise_drop_to_keyframe_state_after, UTC time, process and thread identifiers, component version, and a correlation ID. For privacy-safe it diagnostics, log metadata and fingerprints instead of confidential source values.
What must be true before accepting it
Verify that the stream can recover decoding state at the next key frame and the skipped interval is acceptable. Only this contract check establishes that it is safe for the caller’s next step.
The return of it can follow observable side effects, so recovery begins with state reconciliation.
Correct handling and recovery
Discard dependent frames until the next key frame, reset decoder state as documented, and report the skipped interval. Consider bitrate or resource adaptation afterward.
Retry it only when a documented input or state has changed. Before another call following it, confirm that completed side effects are idempotent or reconciled.
Difference from nearby results
It must be distinguished from ordinary S_OK and from failure-severity values in the same API family; its documented state changes control the next action.
A nearby HRESULT can change object ownership, output validity, or the permitted next method.
Practical scenario
A severely late compressed stream cannot catch up by dropping one frame. The graph skips to the next key frame and resumes with a clean decoder reference state.
A regression test should reproduce it, assert the relevant outputs and state, then change only the decisive condition and verify the expected neighboring result or ordinary completion.
References
- Microsoft: Windows Media Format SDK error codes — official Microsoft material used to interpret it.
- Microsoft: Windows Media Player SDK
- Microsoft: Windows Media Player buffering event
- Microsoft: HRESULT values
Looking for a different code? Search another status or error code.