From 43e4b9695a4342112b1117db6526bafa1f9dab3e Mon Sep 17 00:00:00 2001
From: Jan Chren (rindeal) <dev.rind...@gmail.com>
Date: Thu, 1 Apr 2020 00:00:00 +0000
Subject: [PATCH] avformat/matroskaenc: remove MAX_TRACKS limit

It was introduced in 7be0f48a32155ef9f471ffc5a1b41d662ea337f1
to set size of an array struct field, but that bad design was fixed
in 65ef74f74900590f134b4a130e8f56e5272d1925.
As such this artificial limit serves no purpose anymore.

Signed-off-by: Jan Chren (rindeal) <dev.rind...@gmail.com>
---
 libavformat/matroskaenc.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 5dae53026d8..3af05403d1d 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -117,10 +117,6 @@ typedef struct mkv_attachments {
 #define MODE_MATROSKAv2 0x01
 #define MODE_WEBM       0x02
 
-/** Maximum number of tracks allowed in a Matroska file (with track numbers in
- * range 1 to 126 (inclusive) */
-#define MAX_TRACKS 126
-
 typedef struct MatroskaMuxContext {
     const AVClass   *class;
     int             mode;
@@ -2604,13 +2600,6 @@ static int mkv_init(struct AVFormatContext *s)
 {
     int i;
 
-    if (s->nb_streams > MAX_TRACKS) {
-        av_log(s, AV_LOG_ERROR,
-               "At most %d streams are supported for muxing in Matroska\n",
-               MAX_TRACKS);
-        return AVERROR(EINVAL);
-    }
-
     for (i = 0; i < s->nb_streams; i++) {
         if (s->streams[i]->codecpar->codec_id == AV_CODEC_ID_ATRAC3 ||
             s->streams[i]->codecpar->codec_id == AV_CODEC_ID_COOK ||
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to