[FFmpeg-cvslog] avcodec/dct: use av_malloc_array()

Michael Niedermayer git at videolan.org
Sun May 11 20:12:12 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 11 20:06:45 2014 +0200| [5e95551199871e5912c7bd498cbcc502d33113aa] | committer: Michael Niedermayer

avcodec/dct: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/dct.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dct.c b/libavcodec/dct.c
index b1ee06a..26b4851 100644
--- a/libavcodec/dct.c
+++ b/libavcodec/dct.c
@@ -190,7 +190,7 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
         ff_init_ff_cos_tabs(nbits + 2);
 
         s->costab = ff_cos_tabs[nbits + 2];
-        s->csc2   = av_malloc(n / 2 * sizeof(FFTSample));
+        s->csc2   = av_malloc_array(n / 2, sizeof(FFTSample));
 
         if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
             av_free(s->csc2);



More information about the ffmpeg-cvslog mailing list