Rémi Bernon (@rbernon) commented about dlls/winegstreamer/video_decoder.c:
wg_sample_queue_flush(decoder->wg_sample_queue, false);
if (decoder->provide_timestamps)
{ if (FAILED(IMFMediaType_GetUINT64(decoder->input_type, &MF_MT_FRAME_RATE, &frame_rate))) frame_rate = (UINT64)30000 << 32 | 1001;
duration = (UINT64)10000000 * (UINT32)frame_rate / (frame_rate >> 32);
if (FAILED(IMFSample_SetSampleTime(sample, decoder->sample_time)))
duration = ((UINT64)10000000 * (UINT32)frame_rate + (frame_rate >> 32)/2) / (frame_rate >> 32);
}
if (SUCCEEDED(IMFSample_GetUINT32(sample, &MFSampleExtension_WG_Timestamp, &value)) && value)
{
if (FAILED(IMFSample_GetSampleTime(sample, (LONGLONG*)&decoder->sample_time)))
WARN("Failed to get sample time\n");
Or this either, I would expect `provide_timestamps` to be somehow exclusive or orthogonal to input sample timestamps? Is this really supposed to update the `decoder->sample_time`?
ie: `MFSampleExtension_WG_Timestamp` is meant to carry the matching input sample timestamps to its output samples right? So, is an input sample with a timestamp going to update any future unrelated output sample timestamp too if their input samples don't have one?