Bug 1234571 - unregister encoded-frame callback when releasing codec databases. r=pkerr, a=al
authorRandell Jesup <rjesup@jesup.org>
Thu, 31 Dec 2015 16:36:39 -0500
changeset 310603 b07f254acc0f33b820d12e13813bda0d36db06ac
parent 310602 47dce920f0275ed279d6715223e9a449271a71c2
child 310604 6f10c503b63f21523df03ddefa09c7f98221c371
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspkerr, al
bugs1234571
milestone45.0a2
Bug 1234571 - unregister encoded-frame callback when releasing codec databases. r=pkerr, a=al
media/webrtc/trunk/webrtc/modules/video_coding/main/source/generic_encoder.cc
--- a/media/webrtc/trunk/webrtc/modules/video_coding/main/source/generic_encoder.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_coding/main/source/generic_encoder.cc
@@ -80,16 +80,17 @@ VCMGenericEncoder::~VCMGenericEncoder()
 }
 
 int32_t VCMGenericEncoder::Release()
 {
     {
       rtc::CritScope lock(&rates_lock_);
       bit_rate_ = 0;
       frame_rate_ = 0;
+      encoder_->RegisterEncodeCompleteCallback(nullptr);
       vcm_encoded_frame_callback_ = nullptr;
     }
 
     return encoder_->Release();
 }
 
 int32_t
 VCMGenericEncoder::InitEncode(const VideoCodec* settings,