Turned AudioDecoderFactory into a RefCounted thing to use with scoped_refptr.
First step of AudioDecoderFactory injection CLs. AudioDecoderFactories will be shared, and shared_ptr is currently off the table, so this CL changes the current uses of AudioDecoderFactory from std::unique_ptr to rtc::scoped_refptr.
BUG=webrtc:5805
Review-Url: https://codereview.webrtc.org/1990803004
Cr-Commit-Position: refs/heads/master@{#12815}
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.cc b/webrtc/modules/audio_coding/neteq/decoder_database.cc
index 4fddf75..e5f4462 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.cc
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.cc
@@ -20,10 +20,10 @@
namespace webrtc {
DecoderDatabase::DecoderDatabase(
- std::unique_ptr<AudioDecoderFactory> decoder_factory)
+ const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory)
: active_decoder_type_(-1),
active_cng_decoder_type_(-1),
- decoder_factory_(std::move(decoder_factory)) {}
+ decoder_factory_(decoder_factory) {}
DecoderDatabase::~DecoderDatabase() = default;