summaryrefslogtreecommitdiff
path: root/libavcodec/mimic.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-12 13:17:37 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-12 13:17:37 +0000
commit238ef6dadd13b9a867eaa7382bdba751e25c40b9 (patch)
treeac0228289581351403ee3f1d9ad187919d498fbb /libavcodec/mimic.c
parent9bf993a5b5f8bf10c590d83c795467606f92cf6e (diff)
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.c2
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);