check for malloc failure
Originally committed as revision 15132 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
db568c079a
commit
e8c4df40e3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user