[FFmpeg-cvslog] avfilter/vf_fieldmatch: use av_malloc_array()

Paul B Mahol git at videolan.org
Thu Jan 21 14:41:23 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Jan 21 12:28:13 2021 +0100| [27f1ee7f53adf665818d89ce468e7e10bce4c831] | committer: Paul B Mahol

avfilter/vf_fieldmatch: use av_malloc_array()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27f1ee7f53adf665818d89ce468e7e10bce4c831
---

 libavfilter/vf_fieldmatch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 57ecf73864..528f943172 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -951,8 +951,8 @@ static int config_input(AVFilterLink *inlink)
     fm->tpitchuv = FFALIGN(w >> 1, 16);
 
     fm->tbuffer = av_calloc((h/2 + 4) * fm->tpitchy, sizeof(*fm->tbuffer));
-    fm->c_array = av_malloc((((w + fm->blockx/2)/fm->blockx)+1) *
-                            (((h + fm->blocky/2)/fm->blocky)+1) *
+    fm->c_array = av_malloc_array((((w + fm->blockx/2)/fm->blockx)+1) *
+                            (((h + fm->blocky/2)/fm->blocky)+1),
                             4 * sizeof(*fm->c_array));
     if (!fm->tbuffer || !fm->c_array)
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list