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

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

Issue 2430703002: Add fuzzer for H264 bitstream parser. (Closed)
Patch Set: Created 4 years, 2 months 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
« webrtc/test/fuzzers/BUILD.gn ('K') | « webrtc/test/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fuzzers/h264_bitstream_parser_fuzzer.cc
diff --git a/webrtc/test/fuzzers/sdp_parser_fuzzer.cc b/webrtc/test/fuzzers/h264_bitstream_parser_fuzzer.cc
similarity index 64%
copy from webrtc/test/fuzzers/sdp_parser_fuzzer.cc
copy to webrtc/test/fuzzers/h264_bitstream_parser_fuzzer.cc
index f21c991a3e1da9983514f636400e22cf9c989c9d..1575e392a952c9afb70db4e7c971300852ba519a 100644
--- a/webrtc/test/fuzzers/sdp_parser_fuzzer.cc
+++ b/webrtc/test/fuzzers/h264_bitstream_parser_fuzzer.cc
@@ -7,19 +7,18 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-
-#include <stddef.h>
#include <stdint.h>
-#include "webrtc/api/jsepsessiondescription.h"
+#include <vector>
kthelgason 2016/10/19 11:14:25 Seems unnecessary?
pbos-webrtc 2016/10/19 21:45:23 Done.
+
+#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
kthelgason 2016/10/19 11:14:25 or this?
pbos-webrtc 2016/10/19 21:45:23 Done.
+#include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h"
namespace webrtc {
void FuzzOneInput(const uint8_t* data, size_t size) {
- std::string message(reinterpret_cast<const char*>(data), size);
- webrtc::SdpParseError error;
-
- std::unique_ptr<webrtc::SessionDescriptionInterface> sdp(
- CreateSessionDescription("offer", message, &error));
+ H264BitstreamParser h264_bitstream_parser;
+ h264_bitstream_parser.ParseBitstream(data, size);
+ int qp;
+ h264_bitstream_parser.GetLastSliceQp(&qp);
}
-
} // namespace webrtc
« webrtc/test/fuzzers/BUILD.gn ('K') | « webrtc/test/fuzzers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698