[FFmpeg-cvslog] avformat/rtspdec: Use av_mallocz_array()

Michael Niedermayer git at videolan.org
Tue May 27 20:56:22 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 27 20:30:56 2014 +0200| [5be8c276946d9228cddfa8049bd49eeaf542eb81] | committer: Michael Niedermayer

avformat/rtspdec: Use av_mallocz_array()

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

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

 libavformat/rtspdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index af20465..51c80c6 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -696,7 +696,7 @@ static int rtsp_read_header(AVFormatContext *s)
             return ret;
 
         rt->real_setup_cache = !s->nb_streams ? NULL :
-            av_mallocz(2 * s->nb_streams * sizeof(*rt->real_setup_cache));
+            av_mallocz_array(s->nb_streams, 2 * sizeof(*rt->real_setup_cache));
         if (!rt->real_setup_cache && s->nb_streams)
             return AVERROR(ENOMEM);
         rt->real_setup = rt->real_setup_cache + s->nb_streams;



More information about the ffmpeg-cvslog mailing list