| Previous | Next |
| VFW_E_INVALID_MEDIA_TYPE | VFW_E_MEDIA_TIME_NOT_SET |
VFW_E_SAMPLE_TIME_NOT_SET
Exact result and bit fields
VFW_E_SAMPLE_TIME_NOT_SET has the unsigned HRESULT value 2147746377 (0x80040249) and the signed 32-bit representation -2147220919. AllStat describes it as “No time stamp has been set for this sample”. In the operation that produces this result, code requests the presentation start and stop times of an IMediaSample that has no reference-time timestamp.
The high bit is set, so this value is a failure HRESULT. Its facility field is 4 (FACILITY_ITF) and its low code is 585 (0x0249). These fields classify this result, but they do not identify which filter, thread, device, file or graph generation returned it.
Contract boundary
This result occurs in the data-delivery and timing contract between DirectShow filters. Reference time, media time, sample flags, buffering and seeking formats are separate metadata channels and must not be substituted for one another without an explicit conversion.
The practical owner to locate for this HRESULT is the first producer of the sample or seeking state and the immediate consumer. When handling this result, capture the native result before a wrapper replaces it with a generic exception, and keep the graph generation or object identity with the record.
Step-by-step diagnosis
- Capture it at the first native return, not only at the top-level playback failure.
- identify the exact graph stage described here: code requests the presentation start and stop times of an IMediaSample that has no reference-time timestamp.
- compare the live object state, topology and input with the documented interface preconditions.
- Before changing filters, drivers, registry data or media for this HRESULT, collect the code-specific evidence below.
- Test one evidence-backed the correction on the smallest reproducible graph.
- Verify that the corrected run no longer returns it and does not merely replace it with a nearby HRESULT.
Conditions that can produce it
- Cause 1 for this HRESULT: the source filter never called SetTime.
- Cause 2 for this HRESULT: a transform created a replacement sample without copying timing metadata.
- Cause 3 for this HRESULT: a deliberately untimed sample reached code that assumes every sample is scheduled.
Evidence worth preserving
Log the interface and method, filter CLSID and friendly name, process and thread, graph state, connected pin names, media-type summary, renderer or device identity where relevant, and the first preceding HRESULT. Record lengths and hashes instead of raw content when the incident includes timestamps, media positions, source identifiers and sample payload details.
- Evidence 1 for this HRESULT: GetTime return at the first consumer.
- Evidence 2 for this HRESULT: sample flags, discontinuity and sync-point state.
- Evidence 3 for this HRESULT: upstream filter and whether it allocated a new sample.
Correction strategy
- Action 1 for this HRESULT: set valid stream times where the source contract requires them.
- Action 2 for this HRESULT: copy timestamps when cloning samples.
- Action 3 for this HRESULT: handle untimed samples explicitly in filters that permit them.
Retry and recovery
Retry rule for this HRESULT: Retry only after the sample metadata is populated or a new timed sample arrives; timing cannot be inferred safely from the HRESULT alone. A safe it retry must use a changed capability, state, object generation or input. While recovering from it, preserve cancellation and avoid replaying side effects when the original operation may have partially completed.
How it differs from nearby results
VFW_E_MEDIA_TIME_NOT_SET concerns media-relative positions, whereas it concerns graph reference-time presentation timestamps. Keep those cases separate in telemetry, UI messages and retry policy because their next actions are different.
Example incident
A transform copies pixels into a new allocator sample but omits SetTime; preserving the input start and stop values removes it. This example keeps the diagnosis at the specific the boundary instead of treating every DirectShow failure as a codec reinstall problem.
Implementation notes
Code that handles it should preserve the original HRESULT, the failed stage and an opaque correlation identifier. After it, do not infer success from partial graph construction, and do not continue using interfaces retained from a graph or device generation that has already changed.
Operational remediation for this HRESULT should favor supported component installation, device configuration and documented DirectShow calls. Manual registry or driver changes are appropriate only when the collected evidence for this HRESULT points to that layer and a rollback is available.
Official Microsoft references
- Microsoft: DirectShow error and success codes
- Microsoft: IMediaSample
- Microsoft: IMediaSample::GetTime
Looking for a different code? Search another status or error code.