[FFmpeg-cvslog] avdevice/lavfi: av_malloc -> av_malloc_array
Limin Wang
git at videolan.org
Mon Sep 21 04:41:59 EEST 2020
ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Thu Sep 17 22:05:17 2020 +0800| [6c8ff1838d1384609f865fc3074cb5cf65aa6ba8] | committer: Limin Wang
avdevice/lavfi: av_malloc -> av_malloc_array
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c8ff1838d1384609f865fc3074cb5cf65aa6ba8
---
libavdevice/lavfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list