• Erwan Tulou's avatar
    mft: fix probe issue with GUI threads · 87193015
    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.
    (cherry picked from commit 545124d3)
    Signed-off-by: default avatarErwan Tulou <erwan10@videolan.org>
mft.c 35.4 KB