]> granicus.if.org Git - libvpx/commitdiff
vpx_dec_fuzzer: add coverage for VP9D_SET_LOOP_FILTER_OPT
authorJames Zern <jzern@google.com>
Wed, 6 May 2020 20:42:43 +0000 (13:42 -0700)
committerJames Zern <jzern@google.com>
Wed, 6 May 2020 20:45:30 +0000 (13:45 -0700)
BUG=chromium:1076203

Change-Id: Ib3339a9fd7d940b69a5ef89b3fbf7f4fdeaac006

examples/vpx_dec_fuzzer.cc

index d55fe1571be359995cbfb438ab9d38ba49f88710..34c0e112383b8a1ac8304a791da98a72398db5a9 100644 (file)
@@ -94,6 +94,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     return 0;
   }
 
+  if (threads > 1) {
+    const int enable = (data[IVF_FILE_HDR_SZ] & 0xa0) != 0;
+    const vpx_codec_err_t err =
+        vpx_codec_control(&codec, VP9D_SET_LOOP_FILTER_OPT, enable);
+    static_cast<void>(err);
+  }
+
   data += IVF_FILE_HDR_SZ;
   size -= IVF_FILE_HDR_SZ;