summaryrefslogtreecommitdiff
path: root/libavfilter/qsvvpp.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-14 21:31:53 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 01:03:52 +0200
commit1ea365082318f06cd42a8b37dd0c7724b599c821 (patch)
tree4df48a8b9f4614803fd2a88c29ad2ff7f7070294 /libavfilter/qsvvpp.c
parent4b154743163ffbe3fdc50759c0c55dc854636488 (diff)
Replace all occurences of av_mallocz_array() by av_calloc()
They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/qsvvpp.c')
-rw-r--r--libavfilter/qsvvpp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index 135d4c4e36..d1218355c7 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -499,8 +499,8 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
s->in_mem_mode = in_frames_hwctx->frame_type;
- s->surface_ptrs_in = av_mallocz_array(in_frames_hwctx->nb_surfaces,
- sizeof(*s->surface_ptrs_in));
+ s->surface_ptrs_in = av_calloc(in_frames_hwctx->nb_surfaces,
+ sizeof(*s->surface_ptrs_in));
if (!s->surface_ptrs_in)
return AVERROR(ENOMEM);
@@ -548,8 +548,8 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
return ret;
}
- s->surface_ptrs_out = av_mallocz_array(out_frames_hwctx->nb_surfaces,
- sizeof(*s->surface_ptrs_out));
+ s->surface_ptrs_out = av_calloc(out_frames_hwctx->nb_surfaces,
+ sizeof(*s->surface_ptrs_out));
if (!s->surface_ptrs_out) {
av_buffer_unref(&out_frames_ref);
return AVERROR(ENOMEM);
@@ -672,7 +672,7 @@ int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *p
if (ret < 0)
goto failed;
- s->frame_infos = av_mallocz_array(avctx->nb_inputs, sizeof(*s->frame_infos));
+ s->frame_infos = av_calloc(avctx->nb_inputs, sizeof(*s->frame_infos));
if (!s->frame_infos) {
ret = AVERROR(ENOMEM);
goto failed;
@@ -708,7 +708,7 @@ int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *p
if (IS_OPAQUE_MEMORY(s->in_mem_mode) || IS_OPAQUE_MEMORY(s->out_mem_mode)) {
s->nb_ext_buffers = param->num_ext_buf + 1;
- s->ext_buffers = av_mallocz_array(s->nb_ext_buffers, sizeof(*s->ext_buffers));
+ s->ext_buffers = av_calloc(s->nb_ext_buffers, sizeof(*s->ext_buffers));
if (!s->ext_buffers) {
ret = AVERROR(ENOMEM);
goto failed;