Index: webrtc/test/fuzzers/audio_decoder_isacfix_fuzzer.cc |
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc b/webrtc/test/fuzzers/audio_decoder_isacfix_fuzzer.cc |
similarity index 58% |
copy from webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc |
copy to webrtc/test/fuzzers/audio_decoder_isacfix_fuzzer.cc |
index 45eefb913b80ad4b87e83f7364e9e00baac450cb..83fb8c2d621cc78f78ce2e25d1b3769fb875cc7f 100644 |
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/audio_decoder_isacfix.cc |
+++ b/webrtc/test/fuzzers/audio_decoder_isacfix_fuzzer.cc |
@@ -9,12 +9,14 @@ |
*/ |
#include "webrtc/modules/audio_coding/codecs/isac/fix/include/audio_decoder_isacfix.h" |
- |
-#include "webrtc/modules/audio_coding/codecs/isac/audio_decoder_isac_t_impl.h" |
+#include "webrtc/test/fuzzers/audio_decoder_fuzzer.h" |
namespace webrtc { |
- |
-// Explicit instantiation: |
-template class AudioDecoderIsacT<IsacFix>; |
- |
+void FuzzOneInput(const uint8_t* data, size_t size) { |
+ AudioDecoderIsacFix dec(nullptr); |
+ static const int kSampleRateHz = 16000; |
+ static const size_t kAllocatedOuputSizeSamples = 16000 / 10; // 100 ms. |
+ int16_t output[kAllocatedOuputSizeSamples]; |
+ FuzzAudioDecoder(data, size, &dec, kSampleRateHz, sizeof(output), output); |
+} |
} // namespace webrtc |