summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-14 11:47:55 +0100
committerMans Rullgard <mans@mansr.com>2012-06-17 23:20:10 +0100
commitd9669eab0b8709f66d0872671511cb9487ea2651 (patch)
treee5bfe25fa298d33761ef5e4ee6a01f9198bcaed6 /libavcodec/snow.c
parent8e50c57dcb481479f2fd46f9bdb6a9776b0d9fa6 (diff)
dwt: remove variable-length arrays
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 384cda82ac..edd7d075e4 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -440,6 +440,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
s->spatial_idwt_buffer= av_mallocz(width*height*sizeof(IDWTELEM));
s->spatial_dwt_buffer= av_mallocz(width*height*sizeof(DWTELEM)); //FIXME this does not belong here
+ s->temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM));
+ s->temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM));
for(i=0; i<MAX_REF_FRAMES; i++)
for(j=0; j<MAX_REF_FRAMES; j++)
@@ -618,7 +620,9 @@ av_cold void ff_snow_common_end(SnowContext *s)
int plane_index, level, orientation, i;
av_freep(&s->spatial_dwt_buffer);
+ av_freep(&s->temp_dwt_buffer);
av_freep(&s->spatial_idwt_buffer);
+ av_freep(&s->temp_idwt_buffer);
s->m.me.temp= NULL;
av_freep(&s->m.me.scratchpad);