[FFmpeg-cvslog] avcodec/qtrleenc: use av_mallocz_array()

Michael Niedermayer git at videolan.org
Fri Apr 18 21:09:07 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 18 18:57:58 2014 +0200| [60c8c7144e1df36f1399a11f4085f10e4c5b1ef5] | committer: Michael Niedermayer

avcodec/qtrleenc: use av_mallocz_array()

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

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

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

diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 7f9525a..8750e30 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -106,7 +106,7 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx)
 
     s->rlecode_table = av_mallocz(s->logical_width);
     s->skip_table    = av_mallocz(s->logical_width);
-    s->length_table  = av_mallocz((s->logical_width + 1)*sizeof(int));
+    s->length_table  = av_mallocz_array(s->logical_width + 1, sizeof(int));
     if (!s->skip_table || !s->length_table || !s->rlecode_table) {
         av_log(avctx, AV_LOG_ERROR, "Error allocating memory.\n");
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list