> Just so I understand, SAR clock jumps to pts + \<time it actually took to play this sample/time it would take according to sample rate\> or it jumps blindly to pts + mf sample duration, ignoring actual playback time? I don't know how well sample duration is validated against actual buffer sizes.
It will jump to PTS and then progress from there at the playback rate. I don't think it uses the duration value, just buffer size to determine duration (which is easy to calculate based on frame size and sample rate).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7833#note_101767
> Is this an artifact of your tracing or OnClockRestart() is actually never used?
It was calling `OnClockStart`, but it turns out that was because I had hard-coded the value in my `MESourceStarted` and `MEStreamStarted` events. After changing these events to instead use `pvarStartPosition` passed in `IMFMediaSource::Start`, I get:
```
1330.024952|10088|source_mock_Start: format: {00000000-0000-0000-0000-000000000000} (GUID_NULL) position: <EMPTY>
1330.025598|10088|clock_sink_OnClockRestart: system time 13300255028
```
So sending those events with a hard-coded `VT_I8` value of zero caused `OnClockStart` to be called, but now those events have a value of `VT_EMPTY` and `OnClockRestart` is called.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7833#note_101766