Index: webrtc/test/fuzzers/audio_decoder_ilbc_fuzzer.cc |
diff --git a/webrtc/test/fuzzers/vp9_depacketizer_fuzzer.cc b/webrtc/test/fuzzers/audio_decoder_ilbc_fuzzer.cc |
similarity index 57% |
copy from webrtc/test/fuzzers/vp9_depacketizer_fuzzer.cc |
copy to webrtc/test/fuzzers/audio_decoder_ilbc_fuzzer.cc |
index 02a7cc0f813be76e831375a1755451a3a9e63664..d2a87f0cb676e67888482a37d0968e7a3ea71ab5 100644 |
--- a/webrtc/test/fuzzers/vp9_depacketizer_fuzzer.cc |
+++ b/webrtc/test/fuzzers/audio_decoder_ilbc_fuzzer.cc |
@@ -7,12 +7,16 @@ |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h" |
+ |
+#include "webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h" |
+#include "webrtc/test/fuzzers/audio_decoder_fuzzer.h" |
namespace webrtc { |
void FuzzOneInput(const uint8_t* data, size_t size) { |
- RtpDepacketizerVp9 depacketizer; |
- RtpDepacketizer::ParsedPayload parsed_payload; |
- depacketizer.Parse(&parsed_payload, data, size); |
+ AudioDecoderIlbc dec; |
+ static const int kSampleRateHz = 8000; |
+ static const size_t kAllocatedOuputSizeSamples = kSampleRateHz / 10; |
+ int16_t output[kAllocatedOuputSizeSamples]; |
+ FuzzAudioDecoder(data, size, &dec, kSampleRateHz, sizeof(output), output); |
} |
} // namespace webrtc |