Pass ownership of external encoders to the ACM
We want this because otherwise the ACM uses its mutex to protect an encoder that's owned by someone else. That someone else may easily slip up and delete or otherwise touch the encoder before making sure that the ACM has stopped using it, bypassing the lock. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1702943002 Cr-Commit-Position: refs/heads/master@{#11909}
This commit is contained in:
@ -41,6 +41,9 @@ class CodecManager final {
|
||||
const CodecInst* GetCodecInst() const {
|
||||
return send_codec_inst_ ? &*send_codec_inst_ : nullptr;
|
||||
}
|
||||
|
||||
void UnsetCodecInst() { send_codec_inst_ = rtc::Optional<CodecInst>(); }
|
||||
|
||||
const RentACodec::StackParameters* GetStackParams() const {
|
||||
return &codec_stack_params_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user