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

Michael Niedermayer git at videolan.org
Tue Apr 8 16:23:59 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  8 16:17:40 2014 +0200| [33c9bb943b671db988d1ebf0aa22df2856f842ce] | committer: Michael Niedermayer

avcodec/avpacket: use av_malloc_array()

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

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

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

diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 00f741a..93efcec 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -394,7 +394,7 @@ int av_packet_split_side_data(AVPacket *pkt){
             p-= size+5;
         }
 
-        pkt->side_data = av_malloc(i * sizeof(*pkt->side_data));
+        pkt->side_data = av_malloc_array(i, sizeof(*pkt->side_data));
         if (!pkt->side_data)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list