mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/magicyuvenc: ensure no slice slot is left unset
This commit is contained in:
parent
67cc7aaa51
commit
f832a77231
1 changed files with 1 additions and 0 deletions
|
|
@ -209,6 +209,7 @@ static av_cold int magy_encode_init(AVCodecContext *avctx)
|
|||
s->nb_slices = FFMIN(s->nb_slices, avctx->height >> s->vshift[1]);
|
||||
s->nb_slices = FFMAX(1, s->nb_slices);
|
||||
s->slice_height = FFALIGN((avctx->height + s->nb_slices - 1) / s->nb_slices, 1 << s->vshift[1]);
|
||||
s->nb_slices = (avctx->height + s->slice_height - 1) / s->slice_height;
|
||||
s->slice_pos = av_calloc(s->nb_slices * s->planes, sizeof(*s->slice_pos));
|
||||
s->slice_size = av_calloc(s->nb_slices * s->planes, sizeof(*s->slice_size));
|
||||
s->slices = av_calloc(s->nb_slices * s->planes, sizeof(*s->slices));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue