Mercurial > libavcodec.hg
diff eatqi.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/eatqi.c Sun Apr 12 12:25:53 2009 +0000 +++ b/eatqi.c Sun Apr 12 13:17:37 2009 +0000 @@ -126,7 +126,7 @@ return -1; } - t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE); + av_fast_malloc(&t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE); if (!t->bitstream_buf) return AVERROR(ENOMEM); s->dsp.bswap_buf(t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4);