Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: webrtc/test/fuzzers/audio_decoder_ilbc_fuzzer.cc

Issue 1499093002: Create fuzzer tests for audio decoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add a public_configs element to webrtc_fuzzer_main Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698