diff options
author | wm4 <wm4@nowhere> | 2015-08-05 23:41:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-05 23:41:29 +0200 |
commit | beb4f8316aca2f206ce1ea743498b4241670c37d (patch) | |
tree | da40098d6ea48641c6e3cf375971e2a66488984b /demux/demux.h | |
parent | 775d81609627e4c6e091ae3761cdb1235f789276 (diff) | |
download | mpv-beb4f8316aca2f206ce1ea743498b4241670c37d.tar.bz2 mpv-beb4f8316aca2f206ce1ea743498b4241670c37d.tar.xz |
demux: add options to control maximum queue size
Add --demuxer-max-packets and --demuxer-max-bytes, which control the
maximum size of the packet queue. These can be helpful to avoid
excessive memory usage.
Memory usage is the reason why there's a limit in the first place. If a
file is more or less broken, and audio and video don't line up, the
decoders will fill up the packet queue trying to read more audio or
video, and the maximum sizes are required to avoid unbounded memory
allocation. Being able to override the maximum sizes is useful; either
for restricting memory usage further, or enlarging the sizes when
attempting to play various broken files.
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/demux/demux.h b/demux/demux.h index 22c7323ef1..710073d26c 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -30,11 +30,6 @@ #include "packet.h" #include "stheader.h" -// Maximum total size of packets queued - if larger, no new packets are read, -// and the demuxer pretends EOF was reached. -#define MAX_PACKS 16000 -#define MAX_PACK_BYTES (400 * 1024 * 1024) - // DEMUXER control commands/answers #define DEMUXER_CTRL_NOTIMPL -1 #define DEMUXER_CTRL_DONTKNOW 0 |