Commit 6c8ff183 authored by Limin Wang's avatar Limin Wang

avdevice/lavfi: av_malloc -> av_malloc_array

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarLimin Wang <lance.lmwang@gmail.com>
parent a554adaa
......@@ -69,7 +69,7 @@ static int *create_all_formats(int n)
count++;
}
if (!(fmts = av_malloc((count+1) * sizeof(int))))
if (!(fmts = av_malloc_array(count + 1, sizeof(*fmts))))
return NULL;
for (j = 0, i = 0; i < n; i++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment