| Previous | Next |
| VFW_E_INVALID_MEDIA_TYPE | VFW_E_MEDIA_TIME_NOT_SET |
VFW_E_SAMPLE_TIME_NOT_SET
Meaning
Windows documents VFW_E_SAMPLE_TIME_NOT_SET as “No time stamp has been set for this sample”. Here, code requests the presentation start and stop times of an IMediaSample that has no reference-time timestamp.
Relevant contract
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.
Start with the first producer of the sample or seeking state and the immediate consumer.
Conditions that can produce it
- Cause 1: the source filter never called SetTime.
- Cause 2: a transform created a replacement sample without copying timing metadata.
- Cause 3: a deliberately untimed sample reached code that assumes every sample is scheduled.
Evidence worth preserving
- Evidence 1: GetTime return at the first consumer.
- Evidence 2: sample flags, discontinuity and sync-point state.
- Evidence 3: upstream filter and whether it allocated a new sample.
Correction strategy
- Action 1: set valid stream times where the source contract requires them.
- Action 2: copy timestamps when cloning samples.
- Action 3: handle untimed samples explicitly in filters that permit them.
Retry and recovery
Retry rule: Retry only after the sample metadata is populated or a new timed sample arrives; timing cannot be inferred safely from the HRESULT alone.
How it differs from nearby results
VFW_E_MEDIA_TIME_NOT_SET concerns media-relative positions, whereas it concerns graph reference-time presentation timestamps.
Example incident
A transform copies pixels into a new allocator sample but omits SetTime; preserving the input start and stop values removes it.
Official Microsoft references
Looking for a different code? Search another status or error code.