diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-09-17 22:05:17 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-09-21 09:30:55 +0800 |
commit | 6c8ff1838d1384609f865fc3074cb5cf65aa6ba8 (patch) | |
tree | 75da79f1557b995a62d5b94e155e7043138af724 | |
parent | a554adaab83f91685edd89f91d7373c1dc60709c (diff) | |
download | ffmpeg-6c8ff1838d1384609f865fc3074cb5cf65aa6ba8.tar.gz |
avdevice/lavfi: av_malloc -> av_malloc_array
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r-- | libavdevice/lavfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index a4b510ff97..ff0be640b1 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -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); |