Skip to content
  • Erwan Tulou's avatar
    mft: fix probe issue with GUI threads · 545124d3
    Erwan Tulou authored
    The skins2 thread as a Gui interface uses OLE/COM set up as 'appartment threaded' for DragNDrop. This thread also uses the vlc decoding facilities to decode still images and therefore is likely to probe decoder modules.
    
    Calling CoInitializeEx() in multithreaded mode is not compatible with the already 'appartment threaded' setting, and therefore fails. In debug mode, this causes an unreachable assert. In non debug mode, the Open() is executed, fails and calls an undue CoUninitialize() which silently breaks the whole OLE setting of the thread.
    
    The patch just gracefully returns on failure.
    545124d3