mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
lavc/flac_parser: use av_fifo_alloc_array
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit is contained in:
parent
bc4f362c92
commit
8aa2988036
@ -707,7 +707,7 @@ static av_cold int flac_parse_init(AVCodecParserContext *c)
|
||||
fpc->pc = c;
|
||||
/* There will generally be FLAC_MIN_HEADERS buffered in the fifo before
|
||||
it drains. This is allocated early to avoid slow reallocation. */
|
||||
fpc->fifo_buf = av_fifo_alloc(FLAC_AVG_FRAME_SIZE * (FLAC_MIN_HEADERS + 3));
|
||||
fpc->fifo_buf = av_fifo_alloc_array(FLAC_MIN_HEADERS + 3, FLAC_AVG_FRAME_SIZE);
|
||||
if (!fpc->fifo_buf)
|
||||
return AVERROR(ENOMEM);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user