Avoid crash in ViEEncoder::DeRegisterExternalEncoder().

BUG=chromium:348222
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/9519004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5660 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org
2014-03-07 18:00:05 +00:00
parent cc08e3f9b1
commit 64e0405552

View File

@@ -385,6 +385,11 @@ int32_t ViEEncoder::DeRegisterExternalEncoder(uint8_t pl_type) {
CriticalSectionScoped cs(data_cs_.get());
send_padding_ = current_send_codec.numberOfSimulcastStreams > 1;
}
// TODO(mflodman): Unfortunately the VideoCodec that VCM has cached a
// raw pointer to an |extra_options| that's long gone. Clearing it here is
// a hack to prevent the following code from crashing. This should be fixed
// for realz. https://code.google.com/p/chromium/issues/detail?id=348222
current_send_codec.extra_options = NULL;
if (vcm_.RegisterSendCodec(&current_send_codec, number_of_cores_,
max_data_payload_length) != VCM_OK) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideo,