tools/target_dec_fuzzer: Set extradata for the parser

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-02-07 14:04:52 +01:00
parent 9c8df64a70
commit a0fd56f55e
1 changed files with 3 additions and 0 deletions

View File

@ -303,6 +303,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
return 0; // Failure of avcodec_open2() does not imply that a issue was found
}
parser_avctx->codec_id = ctx->codec_id;
parser_avctx->extradata_size = ctx->extradata_size;
parser_avctx->extradata = av_memdup(ctx->extradata, ctx->extradata_size);
int got_frame;
AVFrame *frame = av_frame_alloc();