mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
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>
This commit is contained in:
parent
a554adaab8
commit
6c8ff1838d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user