28 Nov
2025
28 Nov
'25
7:21 p.m.
This snippet only passes if it is pasted at the beginning of the test. If it is done afterwards, the MESourceRateChanged is received before the samples from the requests that preceded it.
After some further investigation, it seems like this actually happens because after a previous waiting for timeout on the source (`ret = next_media_event(source, callback, 100, &event); ok(ret == WAIT_TIMEOUT, "Unexpected ret %#lx.\n", ret);`), the BeginGetEvent call remains pending on the source. Once the rate change event fires it then overwrites sample events. This can be fixed by using separate callbacks for stream and source events. Sorry for the confusion. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8505#note_124039