Browse Source

avcodec/libxavs: Use av_mallocz_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 12 years ago
parent
commit
dcad6ba68a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/libxavs.c

+ 1
- 1
libavcodec/libxavs.c View File

@@ -353,7 +353,7 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
if (!x4->enc) if (!x4->enc)
return -1; return -1;


if (!(x4->pts_buffer = av_mallocz((avctx->max_b_frames+1) * sizeof(*x4->pts_buffer))))
if (!(x4->pts_buffer = av_mallocz_array((avctx->max_b_frames+1), sizeof(*x4->pts_buffer))))
return AVERROR(ENOMEM); return AVERROR(ENOMEM);


avctx->coded_frame = av_frame_alloc(); avctx->coded_frame = av_frame_alloc();


Loading…
Cancel
Save