What does HRESULT 0x80040251 (VFW_E_MEDIA_TIME_NOT_SET) mean?

 
Previous Next
VFW_E_SAMPLE_TIME_NOT_SET VFW_E_NO_TIME_FORMAT_SET

VFW_E_MEDIA_TIME_NOT_SET

Meaning

Windows documents VFW_E_MEDIA_TIME_NOT_SET as “No media time stamp has been set for this sample”. Here, a caller asks an IMediaSample for media start and stop positions when no media-time pair was assigned.

Evidence worth preserving

  • Evidence 1: GetMediaTime result and sample identity.
  • Evidence 2: source format and native unit used for media positions.
  • Evidence 3: transform chain and metadata-copy behavior.

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 parser does not expose source-unit positions.
  • Cause 2: SetMediaTime was called with null pointers to clear the values.
  • Cause 3: a sample wrapper preserved presentation time but dropped media time.

Correction strategy

  • Action 1: treat media time as optional unless the filter contract requires it.
  • Action 2: propagate media positions through transforms that preserve source ordering.
  • Action 3: avoid substituting reference time without a documented conversion.

Example incident

An indexer expects frame numbers from GetMediaTime, but the source only timestamps samples in reference time; changing the indexer contract avoids it.

Retry and recovery

Retry rule: Retry when a later sample or corrected producer provides media positions; repeating GetMediaTime on the same unchanged sample will return the same result.

How it differs from nearby results

VFW_E_SAMPLE_TIME_NOT_SET reports absent presentation timestamps; it reports absent source-media positions.

Official Microsoft references


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