Commit 8aa29880 authored by Lukasz Marek's avatar Lukasz Marek

lavc/flac_parser: use av_fifo_alloc_array

Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
parent bc4f362c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment