mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +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++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(fmts = av_malloc((count+1) * sizeof(int))))
|
if (!(fmts = av_malloc_array(count + 1, sizeof(*fmts))))
|
||||||
return NULL;
|
return NULL;
|
||||||
for (j = 0, i = 0; i < n; i++) {
|
for (j = 0, i = 0; i < n; i++) {
|
||||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user