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

Commit e8f564ee 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 am: 14fffb22

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



Change-Id: I815ad567772e61be2539a537a75fe065f09da5f0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 90ffa265 14fffb22
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;