summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-10-02 19:57:01 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commitc91e659f88450bee3937bdef4338903c508cbba2 (patch)
treec4ded0e89bf343ad2c98d06822a38a91251737a4 /demux/demux_lavf.c
parentca142be7e8c42d8fbc21935ee3f3db2b6d2f457c (diff)
downloadmpv-c91e659f88450bee3937bdef4338903c508cbba2.tar.bz2
mpv-c91e659f88450bee3937bdef4338903c508cbba2.tar.xz
stream: redo buffer handling and allow arbitrary size for stream_peek()
struct stream used to include the stream buffer, including peek buffer, inline in the struct. It could not be resized, which means the maximum peek size was set in stone. This meant demux_lavf.c could peek only so much data. Change it to use a dynamic buffer. Because it's possible, keep the inline buffer for default buffer sizes (which are basically always used outside of file opening). It's unknown whether it really helps with anything. Probably not. This is also the fallback plan in case we need something like the old stream cache in order to deal with mp4 + unseekable http: the code can now be easily changed to use any buffer size.
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index d6e14b8617..84980937d0 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -60,7 +60,7 @@
#endif
#define INITIAL_PROBE_SIZE STREAM_BUFFER_SIZE
-#define PROBE_BUF_SIZE FFMIN(STREAM_MAX_BUFFER_SIZE, 2 * 1024 * 1024)
+#define PROBE_BUF_SIZE (2 * 1024 * 1024)
// Should correspond to IO_BUFFER_SIZE in libavformat/aviobuf.c (not public)