mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/utvideoenc: use av_fast_padded_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
82e576046c
commit
8e609eb475
@ -513,8 +513,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
|
|
||||||
bytestream2_init_writer(&pb, dst, pkt->size);
|
bytestream2_init_writer(&pb, dst, pkt->size);
|
||||||
|
|
||||||
av_fast_malloc(&c->slice_bits, &c->slice_bits_size,
|
av_fast_padded_malloc(&c->slice_bits, &c->slice_bits_size, width * height);
|
||||||
width * height + FF_INPUT_BUFFER_PADDING_SIZE);
|
|
||||||
|
|
||||||
if (!c->slice_bits) {
|
if (!c->slice_bits) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer 2.\n");
|
av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer 2.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user