mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 20:02:42 +00:00
avcodec/magicyuvenc: check for allocation return value
This commit is contained in:
parent
f832a77231
commit
4d1b7ff733
@ -215,7 +215,7 @@ static av_cold int magy_encode_init(AVCodecContext *avctx)
|
||||
s->slices = av_calloc(s->nb_slices * s->planes, sizeof(*s->slices));
|
||||
s->bitslices = av_calloc(s->nb_slices * s->planes, sizeof(*s->bitslices));
|
||||
s->counts = av_calloc(s->nb_slices * s->planes * 256, sizeof(*s->counts));
|
||||
if (!s->slices || !s->slice_pos || !s->counts || !s->slice_size)
|
||||
if (!s->slices || !s->slice_pos || !s->counts || !s->slice_size || !s->bitslices)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
s->bitslice_size = avctx->width * (s->slice_height + 2) + AV_INPUT_BUFFER_PADDING_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user