summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-08 15:44:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-08 15:44:32 +0200
commit53487268e55538badf47b6a0fd138fadc87d93bb (patch)
tree40386bd7b73e43b472c832bd60c38e2ab7b9fb58 /cmdutils.c
parentc8a1f10cf486faa204aeeda5dac2d23912103cc3 (diff)
downloadffmpeg-53487268e55538badf47b6a0fd138fadc87d93bb.tar.gz
cmdutils: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c
index be3189ae24..ebbbe7fc37 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -662,7 +662,7 @@ static void init_parse_context(OptionParseContext *octx,
memset(octx, 0, sizeof(*octx));
octx->nb_groups = nb_groups;
- octx->groups = av_mallocz(sizeof(*octx->groups) * octx->nb_groups);
+ octx->groups = av_mallocz_array(octx->nb_groups, sizeof(*octx->groups));
if (!octx->groups)
exit_program(1);
@@ -1966,7 +1966,7 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s,
if (!s->nb_streams)
return NULL;
- opts = av_mallocz(s->nb_streams * sizeof(*opts));
+ opts = av_mallocz_array(s->nb_streams, sizeof(*opts));
if (!opts) {
av_log(NULL, AV_LOG_ERROR,
"Could not alloc memory for stream options.\n");