aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-18 17:00:30 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-10 22:42:03 +0100
commit7dd1cc6076cab5f4c41a4b0b877024d0654e8fae (patch)
tree9976c36f548f1d4c8b183cdcf26632d7842714fa /libavformat/avformat.h
parent667c9ed1f14cd049c14cb849386ebe38671ec00b (diff)
downloadffmpeg-7dd1cc6076cab5f4c41a4b0b877024d0654e8fae.tar.gz
avformat: Add max_streams option
This allows user apps to stop OOM due to excessive number of streams Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1296f844955e513d19051c962656f829479d4fb9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 34bad436cd..06a71c97ff 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1866,6 +1866,13 @@ typedef struct AVFormatContext {
* A callback for closing the streams opened with AVFormatContext.io_open().
*/
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
+
+ /**
+ * The maximum number of streams.
+ * - encoding: unused
+ * - decoding: set by user through AVOptions (NO direct access)
+ */
+ int max_streams;
} AVFormatContext;
int av_format_get_probe_score(const AVFormatContext *s);