From 33895451570742c47404fec52d87a5c71de26b83 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 2 Jul 2012 10:39:54 +0300 Subject: snow: remove a VLA used for edge emulation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/snow.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/snow.c') diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 629367ac44..d69f452e5d 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -395,6 +395,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ SnowContext *s = avctx->priv_data; int width, height; int i, j, ret; + int emu_buf_size; s->avctx= avctx; s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe @@ -462,6 +463,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ return ret; } FF_ALLOC_OR_GOTO(avctx, s->scratchbuf, s->mconly_picture.linesize[0]*7*MB_SIZE, fail); + emu_buf_size = s->mconly_picture.linesize[0] * (2 * MB_SIZE + HTAPS_MAX - 1); + FF_ALLOC_OR_GOTO(avctx, s->emu_edge_buffer, emu_buf_size, fail); return 0; fail: @@ -648,6 +651,7 @@ av_cold void ff_snow_common_end(SnowContext *s) av_freep(&s->block); av_freep(&s->scratchbuf); + av_freep(&s->emu_edge_buffer); for(i=0; iref_mvs[i]); -- cgit v1.2.3