GameplayMediaEncoder crashes on shutdown

Hi.
I was trying to use the GameplayMediaEncoder directly via C++ code as well as via cmd. It doesn’t shutdown right.
Calling shutdown() crashes the system as the functions that handle audio stream keep pumping in the sound data to the audio encoder which has been disposed. stop() method seems to be buggy as well as even after calling it the video frame grabbing logic continues executing.