RFR: 8267819: CoInitialize/CoUninitialize should be called on same thread

Alexander Matveev almatvee at openjdk.java.net
Thu May 27 04:23:15 UTC 2021


JDK-8264737 introduced new code for audio device removal/arrival notifications which calls CoInitialize/CoUninitialize on separate threads. CoInitialize/CoUninitialize should be called on same thread, since initialization is per thread. Doing it on separate thread will result in unloading COM libraries on that thread and if it uses COM libraries it might not work correctly. Fixed by calling it on same thread in same way it is done in dshowwrapper.

-------------

Commit messages:
 - 8267819: CoInitialize/CoUninitialize should be called on same thread

Changes: https://git.openjdk.java.net/jfx/pull/521/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=521&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267819
  Stats: 22 lines in 2 files changed: 10 ins; 9 del; 3 mod
  Patch: https://git.openjdk.java.net/jfx/pull/521.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/521/head:pull/521

PR: https://git.openjdk.java.net/jfx/pull/521


More information about the openjfx-dev mailing list