[FFmpeg-cvslog] avformat/rtsp: use av_malloc_array()

Michael Niedermayer git at videolan.org
Mon Jun 30 05:21:56 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 30 05:08:16 2014 +0200| [ca384d708b74b8b8105b7fe5707645f6824e3cea] | committer: Michael Niedermayer

avformat/rtsp: use av_malloc_array()

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

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

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

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index dfd0f83..5212dde 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -658,7 +658,7 @@ int ff_sdp_parse(AVFormatContext *s, const char *content)
         av_free(s1->default_exclude_source_addrs[i]);
     av_freep(&s1->default_exclude_source_addrs);
 
-    rt->p = av_malloc(sizeof(struct pollfd)*2*(rt->nb_rtsp_streams+1));
+    rt->p = av_malloc_array(rt->nb_rtsp_streams + 1, sizeof(struct pollfd) * 2);
     if (!rt->p) return AVERROR(ENOMEM);
     return 0;
 }



More information about the ffmpeg-cvslog mailing list