https://bugs.winehq.org/show_bug.cgi?id=38241
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 51049 --> https://bugs.winehq.org/attachment.cgi?id=51049 proposed patch
From my inspection, this is MCI Mpegvideo driver, mciqtz32's issue.
Generally, mci "open" and "close" can call in different threads for the same device. Therefore, the following case triggers 'CoUninitialize Mismatch' in the current implementation. 1. thread A, open foo.mp3 with MPEGVideo driver. i.e. 'open foo.mp3 alias foo type MPEGVideo'. MCIQTZ_mciOpen() silently calls CoInitialize() for thread A. 2. thread A, play foo. 3. thread B, close foo. MCIQTZ_mciClose() implicitly calls CoUnintialize() for thread B though the thread is not initialized.
Attached proposed patch introduces a task thread to avoid above situations, and DriverProc passes the arguments to the thread.