mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-27 18:02:11 +00:00
lavf/asfenc: check the number of streams in header
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
7e6b788f7c
commit
0464767301
@ -684,6 +684,11 @@ static int asf_write_header(AVFormatContext *s)
|
||||
s->max_interleave_delta = 0;
|
||||
asf->nb_packets = 0;
|
||||
|
||||
if (s->nb_streams > 127) {
|
||||
av_log(s, AV_LOG_ERROR, "ASF can only handle 127 streams\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
asf->index_ptr = av_malloc(sizeof(ASFIndex) * ASF_INDEX_BLOCK);
|
||||
if (!asf->index_ptr)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user