Mercurial > libavcodec.hg
diff h264.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 | a673af90ed8f |
children | d863de897b41 |
line wrap: on
line diff
--- a/h264.c Sun Apr 12 12:25:53 2009 +0000 +++ b/h264.c Sun Apr 12 13:17:37 2009 +0000 @@ -1411,7 +1411,7 @@ } bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0; // use second escape buffer for inter data - h->rbsp_buffer[bufidx]= av_fast_realloc(h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE); + av_fast_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx], length+FF_INPUT_BUFFER_PADDING_SIZE); dst= h->rbsp_buffer[bufidx]; if (dst == NULL){