I unfortunately couldn't come up with a great way to test this, so it comes without a test. But I found issues when one stream finished before another. If a seek took place prior to completion of the second stream, then it would usually result in the stream that did finish delivering all its queued END_OF_STREAM markers even after the seek. This MR looks to clear that queue when the MFT is flushed (as presumably, any pending input or output samples are no longer wanted on a flush). This MR also clears the draining flag on a flush. As I also ran in to an issue where this flag was set during a seek and remained set afterwards. But after a flush, there should be nothing left to drain. -- v2: mf: Drop events and end draining on MFT flush. https://gitlab.winehq.org/wine/wine/-/merge_requests/10092