diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d958b962a1..b5f1587178 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -205,7 +205,7 @@ int ff_mpv_frame_size_alloc(MpegEncContext *s, int linesize) FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer, alloc_size * 2 * 24, fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, alloc_size * 2 * 16 * 2, + FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, alloc_size * 2 * 16 * 3, fail) s->me.temp = s->me.scratchpad; s->rd_scratchpad = s->me.scratchpad;