I guess native is supposed to not block in that case
That's a good point. If we have two streams call `IMFMediaStream::RequestSample`, then we will process them in sequence rather than in parallel. That is, one stream will have to wait for the other to receive data (as we block all other streams once the source cs is acquired in `source_async_commands_Invoke`).
This MR will at least unblock a stream when there is no more data, but Windows probably delivers data for the other stream immediately (i.e. it can deliver data for one stream, even if the other was already waiting). And I believe I recall seeing audio latency in Wine as a result of this. From memory, it was a 4K video, so delivery of the video sample took a while and as a result the audio fell behind. We should probably look to lock the individual streams rather than the entire source when possible.
It's probably worth adding a comment here to that effect.
Good point again. I've pushed your comment verbatim.