Commit e8c4df40 authored by Baptiste Coudurier's avatar Baptiste Coudurier

check for malloc failure

Originally committed as revision 15132 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent db568c07
......@@ -1616,6 +1616,8 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* 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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment