You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Windows crash on exit with upcoming NDI video output plugin (#510)
### Fix Windows crash on exit with upcoming NDI video output plugin
### Linked issues
NA
### Summarize your change.
This commit makes sure that the allocated video modules are released
when RV exits.
To do so, the TwkApp::VideoModules container which previously contained
raw pointers (std::vector<VideoModule*>) which were never released on
exit, has been converted to std::vector<std::shared_ptr<VideoModule>>
### Describe the reason for the change.
This missing TwkApp::VideoModules cleanup on exit, was causing a crash
on Windows when the upcoming NDI video output plugin was unloaded.
More specifically: The NDI crash was caused when trying to unload the
NDI dll without having called the NDIlib_destroy().
Note that NDIlib_initialize() is called when allocating an NDI video
module while the NDIlib_destroy() is called when releasing the NDI video
module. So it became essential to fix this TwkApp::VideoModules cleanup
on exit to prevent a crash on Windows.
### Describe what you have tested and on which operating system.
Successfully tested on macOS and Windows.
### Add a list of changes, and note any that might need special
attention during the review.
### If possible, provide screenshots.
Signed-off-by: Bernard Laberge <[email protected]>
0 commit comments