mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
flacdec: allocate sample buffers with av_malloc
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 <mans@mansr.com>
This commit is contained in:
parent
0da301e105
commit
93e7ef9a24
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue