| Previous | Next |
| MF_E_NO_SAMPLE_TIMESTAMP | MF_E_INVALID_STREAM_DATA |
MF_E_NO_SAMPLE_DURATION
MF_E_NO_SAMPLE_DURATION means that an IMFSample does not describe how long it represents. A duration is different from a timestamp: one gives the start time, the other gives the length.
Calculate it from the media format
- Call
IMFSample::SetSampleDurationbefore passing samples to a component that needs durations. - For fixed-rate PCM audio, calculate duration from the number of samples per channel and the sample rate.
- For video or variable-rate media, derive duration from the source timing rather than assuming a constant frame interval.
Microsoft documents this status for the AAC encoder when an input sample has no duration.
Microsoft: AAC encoder · Microsoft: IMFSample::GetSampleTime
Looking for a different code? Search another status or error code.