[FFmpeg-cvslog] r15132 - trunk/libavformat/movenc.c

bcoudurier subversion
Sun Aug 31 22:21:01 CEST 2008


Author: bcoudurier
Date: Sun Aug 31 22:21:00 2008
New Revision: 15132

Log:
check for malloc failure

Modified:
   trunk/libavformat/movenc.c

Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c	(original)
+++ trunk/libavformat/movenc.c	Sun Aug 31 22:21:00 2008
@@ -1616,6 +1616,8 @@ static int mov_write_packet(AVFormatCont
         /* copy frame to create needed atoms */
         trk->vosLen = size;
         trk->vosData = av_malloc(size);
+        if (!trk->vosData)
+            return AVERROR(ENOMEM);
         memcpy(trk->vosData, pkt->data, size);
     }
 




More information about the ffmpeg-cvslog mailing list