MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / fuzz_get_buffer2

Function fuzz_get_buffer2

tools/target_dec_fuzzer.c:160–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160static int fuzz_get_buffer2(AVCodecContext *ctx, AVFrame *frame, int flags)
161{
162 switch (ctx->codec_type) {
163 case AVMEDIA_TYPE_VIDEO:
164 return (ctx->codec->capabilities & AV_CODEC_CAP_DR1)
165 ? fuzz_video_get_buffer(ctx, frame)
166 : avcodec_default_get_buffer2(ctx, frame, flags);
167 case AVMEDIA_TYPE_AUDIO:
168 return avcodec_default_get_buffer2(ctx, frame, flags);
169 default:
170 return AVERROR(EINVAL);
171 }
172}
173
174int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
175 uint64_t maxpixels_per_frame = 4096 * 4096;

Callers

nothing calls this directly

Calls 2

fuzz_video_get_bufferFunction · 0.85

Tested by

no test coverage detected