[WebRTC] Give ::Terminated() the same treatment as ::Close_g

This commit is contained in:
Moonchild 2023-10-25 18:30:38 +02:00 committed by roytam1
commit 48c27934c7

View file

@ -527,10 +527,16 @@ WebrtcGmpVideoEncoder::Terminated()
{
LOGD(("GMP Encoder Terminated: %p", (void *)this));
mGMP->Close();
GMPVideoEncoderProxy* gmp(mGMP);
mGMP = nullptr;
mHost = nullptr;
mInitting = false;
if (gmp) {
// Do this last, since this could cause us to be destroyed
gmp->Close();
}
// Could now notify that it's dead
}