1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/asfenc: Check for index_ptr allocation failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-07 22:29:54 +02:00
parent d6bb82387c
commit 3662e251cb

View File

@ -652,6 +652,8 @@ static int asf_write_header(AVFormatContext *s)
asf->nb_packets = 0;
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
if (!asf->index_ptr)
return AVERROR(ENOMEM);
asf->nb_index_memory_alloc = ASF_INDEX_BLOCK;
asf->maximum_packet = 0;