Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14fffb22 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Added limit to number of Loop Iterations in C2Fuzzer" am: 6906fb05...

Merge "Added limit to number of Loop Iterations in C2Fuzzer" am: 6906fb05 am: 704fbabd am: 1d3a3b7b am: 7f118d73

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2049145



Change-Id: I5fd78e86e7303acf544e88823d013bf71f551a76
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2283142c 7f118d73
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -246,7 +246,8 @@ void Codec2Fuzzer::decodeFrames(const uint8_t* data, size_t size) {
  bufferSource->parse();
  c2_status_t status = C2_OK;
  size_t numFrames = 0;
  while (!bufferSource->isEos()) {
  int32_t iterationCount = 0;
  while (!bufferSource->isEos() && ++iterationCount <= kMaxIterations) {
    uint8_t* frame = nullptr;
    size_t frameSize = 0;
    FrameData frameData = bufferSource->getFrame();
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ namespace android {
#define C2FUZZER_ALIGN(_sz, _align) (((_sz) + ((_align)-1)) & ~((_align)-1))

constexpr std::chrono::milliseconds kC2FuzzerTimeOut = 5000ms;
constexpr int32_t kMaxIterations = 100;
constexpr int32_t kNumberOfC2WorkItems = 8;
constexpr uint32_t kWidthOfVideo = 3840;
constexpr uint32_t kHeightOfVideo = 2160;