1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

huffyuv: make use of av_fast_padded_malloc()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-12-06 16:31:54 +00:00
parent eaa47e7454
commit 7f261ac850

View File

@ -992,13 +992,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVFrame *picture = data; AVFrame *picture = data;
av_fast_malloc(&s->bitstream_buffer, av_fast_padded_malloc(&s->bitstream_buffer,
&s->bitstream_buffer_size, &s->bitstream_buffer_size,
buf_size + FF_INPUT_BUFFER_PADDING_SIZE); buf_size);
if (!s->bitstream_buffer) if (!s->bitstream_buffer)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
memset(s->bitstream_buffer + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
s->dsp.bswap_buf((uint32_t*)s->bitstream_buffer, s->dsp.bswap_buf((uint32_t*)s->bitstream_buffer,
(const uint32_t*)buf, buf_size / 4); (const uint32_t*)buf, buf_size / 4);