Mercurial > libavcodec.hg
diff mimic.c @ 9415:141badec76fc libavcodec
Add a av_fast_malloc function and replace several uses of av_fast_realloc,
thus avoiding potential memleaks and pointless memcpys.
author | reimar |
---|---|
date | Sun, 12 Apr 2009 13:17:37 +0000 |
parents | 5a738e8f9524 |
children | 0dce4fe6e6f3 |
line wrap: on
line diff
--- a/mimic.c Sun Apr 12 12:25:53 2009 +0000 +++ b/mimic.c Sun Apr 12 13:17:37 2009 +0000 @@ -334,7 +334,7 @@ prepare_avpic(ctx, &ctx->flipped_ptrs[ctx->cur_index], (AVPicture*) &ctx->buf_ptrs[ctx->cur_index]); - ctx->swap_buf = av_fast_realloc(ctx->swap_buf, &ctx->swap_buf_size, + av_fast_malloc(&ctx->swap_buf, &ctx->swap_buf_size, swap_buf_size + FF_INPUT_BUFFER_PADDING_SIZE); if(!ctx->swap_buf) return AVERROR(ENOMEM);