diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-06-30 10:34:39 -0700 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-07-03 12:16:46 +0300 |
commit | cbd9b2f918af681d206d10340f87fc6aced5cf3e (patch) | |
tree | c27f79cfc43bd2e02d22a013537a646ef00cb8f2 /libavcodec/snow.c | |
parent | 4d8516fdb15d0177ad745228508254dee187dff9 (diff) | |
download | ffmpeg-cbd9b2f918af681d206d10340f87fc6aced5cf3e.tar.gz |
snow: remove the runs[] VLA.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r-- | libavcodec/snow.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 96de9f36d2..629367ac44 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -451,6 +451,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ FF_ALLOCZ_OR_GOTO(avctx, s->spatial_dwt_buffer, width * height * sizeof(DWTELEM), fail); //FIXME this does not belong here FF_ALLOCZ_OR_GOTO(avctx, s->temp_dwt_buffer, width * sizeof(DWTELEM), fail); FF_ALLOCZ_OR_GOTO(avctx, s->temp_idwt_buffer, width * sizeof(IDWTELEM), fail); + FF_ALLOC_OR_GOTO(avctx, s->run_buffer, ((width + 1) >> 1) * ((height + 1) >> 1) * sizeof(*s->run_buffer), fail); for(i=0; i<MAX_REF_FRAMES; i++) for(j=0; j<MAX_REF_FRAMES; j++) @@ -637,6 +638,7 @@ av_cold void ff_snow_common_end(SnowContext *s) av_freep(&s->temp_dwt_buffer); av_freep(&s->spatial_idwt_buffer); av_freep(&s->temp_idwt_buffer); + av_freep(&s->run_buffer); s->m.me.temp= NULL; av_freep(&s->m.me.scratchpad); |