Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2016-02-04 00:53:56 +0300
committerMarton Balint <cus@passwd.hu>2016-02-05 23:32:14 +0300
commit046476730102da3fe795176c9738e4db6bc7036f (patch)
tree9ff97e576e5e88a4b28eccf9dc6e7c283ca11f14 /libavformat/asfenc.c
parent7e6b788f7c4ddd20b25e1d10451d7825c6c60a34 (diff)
lavf/asfenc: check the number of streams in header
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r--libavformat/asfenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 9f082c6d99..6932c11250 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -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);