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

Unified Diff: webrtc/test/fuzzers/audio_decoder_isacfix_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_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

Powered by Google App Engine
This is Rietveld 408576698