Browse Source

zmbv: fix 2 memleaks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 13 years ago
parent
commit
8bd2b27f6b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/zmbv.c

+ 2
- 2
libavcodec/zmbv.c View File

@@ -476,8 +476,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
return -1;
}

c->cur = av_realloc(c->cur, avctx->width * avctx->height * (c->bpp / 8));
c->prev = av_realloc(c->prev, avctx->width * avctx->height * (c->bpp / 8));
c->cur = av_realloc_f(c->cur, avctx->width * avctx->height, (c->bpp / 8));
c->prev = av_realloc_f(c->prev, avctx->width * avctx->height, (c->bpp / 8));
c->bx = (c->width + c->bw - 1) / c->bw;
c->by = (c->height+ c->bh - 1) / c->bh;
if(!c->cur || !c->prev)


Loading…
Cancel
Save