Signed-off-by: Marton Balint <c...@passwd.hu>
---
 libavformat/asfenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 9f082c6..6932c11 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);
-- 
2.6.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to