The phrasing is a bit odd, since if I'm not mistaken, the media type for a given IMediaSample can't change.
You are right. My initial description was based on the MS documentation, which doesn't quite match up with the amstream direct draw sample implementation. So I've modified the commit messages (and MR title/description) to better articulate that.
But that raises a question: is it actually per-sample, or is it about the surface desc on two consecutive samples for the same stream? That is, what if you create two samples with the same surface desc and then call GetMediaType() on both of them?
This was actually already being tested. Both sample1 and sample2 were fetching the media data successfully on their first retrieval.
Are we sure this is correct? What if you call GetMediaType() twice without releasing the sample? What if you don't call GetMediaType() the first time you retrieve the sample but you do call it the second time?
I've just added tests for both of these scenarios. It shows you can call `GetMediaType()` as many times as you like on the first retrieval. But whether you call `GetMediaType()` or not, once you release the sample, `GetMediaType()` will no longer return a media type. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10583#note_135621