diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-12 13:17:37 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-12 13:17:37 +0000 |
commit | 238ef6dadd13b9a867eaa7382bdba751e25c40b9 (patch) | |
tree | ac0228289581351403ee3f1d9ad187919d498fbb /libavcodec/mimic.c | |
parent | 9bf993a5b5f8bf10c590d83c795467606f92cf6e (diff) | |
download | ffmpeg-238ef6dadd13b9a867eaa7382bdba751e25c40b9.tar.gz |
Add a av_fast_malloc function and replace several uses of av_fast_realloc,
thus avoiding potential memleaks and pointless memcpys.
Originally committed as revision 18470 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r-- | libavcodec/mimic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 4716284576..42ae53e7e2 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -334,7 +334,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, 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); |