Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-18 18:46:56 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-18 19:08:23 +0300
commite434840fd4b3c854beec845f950b80bc1bf93b60 (patch)
tree4dcc926d3e1a3284c84d5467e9e1c919945868de /libavcodec/mimic.c
parenta173f484b52ed63292439de5347e49bd78cad0ed (diff)
avcodec/mimic: Use ff_set_dimensions() to set the dimensions
Fixes: OOM Fixes: 1671/clusterfuzz-testcase-minimized-4759078033162240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r--libavcodec/mimic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 607dffa4a5..02d8b30e31 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -390,9 +390,11 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
+ res = ff_set_dimensions(avctx, width, height);
+ if (res < 0)
+ return res;
+
ctx->avctx = avctx;
- avctx->width = width;
- avctx->height = height;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
for (i = 0; i < 3; i++) {
ctx->num_vblocks[i] = AV_CEIL_RSHIFT(height, 3 + !!i);