From: Limin Wang <lance.lmw...@gmail.com> Signed-off-by: Limin Wang <lance.lmw...@gmail.com> --- libavcodec/mpegvideo_enc.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 50ae57e..81542b8 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -928,23 +928,20 @@ FF_ENABLE_DEPRECATION_WARNINGS 2 * 2 * (MAX_LEVEL + 1) * (MAX_RUN + 1) * 2 * sizeof(int), fail); } - FF_ALLOCZ_OR_GOTO(s->avctx, s->avctx->stats_out, 256, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->avctx->stats_out, 256, fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix, 64 * 32 * sizeof(int), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_chroma_intra_matrix, 64 * 32 * sizeof(int), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix, 64 * 32 * sizeof(int), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_chroma_intra_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->input_picture, - MAX_PICTURE_COUNT * sizeof(Picture *), fail); - FF_ALLOCZ_OR_GOTO(s->avctx, s->reordered_input_picture, - MAX_PICTURE_COUNT * sizeof(Picture *), fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_intra_matrix, 64 * 32, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_chroma_intra_matrix, 64 * 32, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_inter_matrix, 64 * 32, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_intra_matrix16, 64 * 32 * 2, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_chroma_intra_matrix16, 64 * 32 * 2, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->q_inter_matrix16, 64 * 32 * 2, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->input_picture, MAX_PICTURE_COUNT, fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->reordered_input_picture, MAX_PICTURE_COUNT, fail); if (s->noise_reduction) { - FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset, - 2 * 64 * sizeof(uint16_t), fail); + FF_ALLOCZ_TYPED_ARRAY_OR_GOTO(s->avctx, s->dct_offset, 2 * 64, fail); } ff_dct_encode_init(s); -- 1.8.3.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".