On 07/02/2012 08:21 PM, Mans Rullgard wrote: > The buffers are only allocated once, although it can happen from > any of a few different places, so there is no need to use realloc. > Using av_malloc() ensures they are aligned suitably for SIMD > optimisations. > > Signed-off-by: Mans Rullgard <[email protected]> > --- > libavcodec/flacdec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c > index da2202a..4b62ea8 100644 > --- a/libavcodec/flacdec.c > +++ b/libavcodec/flacdec.c > @@ -149,8 +149,7 @@ static void allocate_buffers(FLACContext *s) > assert(s->max_blocksize); > > for (i = 0; i < s->channels; i++) { > - s->decoded[i] = av_realloc(s->decoded[i], > - sizeof(int32_t)*s->max_blocksize); > + s->decoded[i] = av_malloc(sizeof(int32_t)*s->max_blocksize); > } > } >
LGTM -Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
