You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/asfenc: Check for index_ptr allocation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -652,6 +652,8 @@ static int asf_write_header(AVFormatContext *s)
|
|||||||
asf->nb_packets = 0;
|
asf->nb_packets = 0;
|
||||||
|
|
||||||
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
|
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->nb_index_memory_alloc = ASF_INDEX_BLOCK;
|
||||||
asf->maximum_packet = 0;
|
asf->maximum_packet = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user