Bug 1417797 - Stop callback in WebrtcGmpVideoDecoder::ReleaseGmp. r=jesup, a=gchang
authorDan Minor <dminor@mozilla.com>
Mon, 20 Nov 2017 07:09:19 -0500
changeset 445051 fbcc274fd508b9ec0a6d57c67dc8b0e74989e658
parent 445050 ca7df6dd14ae19f1dc9136acf601e984ed572a53
child 445052 b6d37f26c25b6f3564031382d6c6ec7fde251000
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, gchang
bugs1417797
milestone58.0
Bug 1417797 - Stop callback in WebrtcGmpVideoDecoder::ReleaseGmp. r=jesup, a=gchang
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -918,16 +918,18 @@ WebrtcGmpVideoDecoder::ReleaseGmp_g(RefP
 {
   aDecoder->Close_g();
 }
 
 int32_t
 WebrtcGmpVideoDecoder::ReleaseGmp()
 {
   LOGD(("GMP Released:"));
+  RegisterDecodeCompleteCallback(nullptr);
+
   if (mGMPThread) {
     mGMPThread->Dispatch(
         WrapRunnableNM(&WebrtcGmpVideoDecoder::ReleaseGmp_g,
                        RefPtr<WebrtcGmpVideoDecoder>(this)),
         NS_DISPATCH_NORMAL);
   }
   return WEBRTC_VIDEO_CODEC_OK;
 }