Don't recreate the speech encoder if we don't have to
If the specification for the speech encoder hasn't changed, we should
reuse it instead of recreating it. Otherwise, we lose its state. (This
problem was originally discovered because AudioEncoderOpus instances
would forget that they were supposed to be using DTX.)
BUG=webrtc:6020, chromium:622647
Review-Url: https://codereview.webrtc.org/2089183002
Cr-Original-Commit-Position: refs/heads/master@{#13273}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 3f81fcd2e845505c2873c7ec2edade910213596b
9 files changed