tools/target_dem_fuzzer: Implement AVSEEK_SIZE
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 7 Jun 2020 23:03:17 +0000 (01:03 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 8 Jun 2020 10:27:18 +0000 (12:27 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tools/target_dem_fuzzer.c

index 4095996..cc097da 100644 (file)
@@ -70,6 +70,8 @@ static int64_t io_seek(void *opaque, int64_t offset, int whence)
         if (offset > INT64_MAX - c->filesize)
             return -1;
         offset += c->filesize;
+    } else if (whence == AVSEEK_SIZE) {
+        return c->filesize;
     }
     if (offset < 0 || offset > c->filesize)
         return -1;