mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mdec: use av_fast_padded_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
62ef736f5a
commit
c783bec6dc
|
@ -170,7 +170,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||||
frame.f->pict_type = AV_PICTURE_TYPE_I;
|
frame.f->pict_type = AV_PICTURE_TYPE_I;
|
||||||
frame.f->key_frame = 1;
|
frame.f->key_frame = 1;
|
||||||
|
|
||||||
av_fast_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
av_fast_padded_malloc(&a->bitstream_buffer, &a->bitstream_buffer_size, buf_size);
|
||||||
if (!a->bitstream_buffer)
|
if (!a->bitstream_buffer)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
for (i = 0; i < buf_size; i += 2) {
|
for (i = 0; i < buf_size; i += 2) {
|
||||||
|
|
Loading…
Reference in New Issue