summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2008-10-04 07:52:27 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2008-10-04 07:52:27 +0300
commit562d86d95cbba67cb58358f6fc334553a467dee7 (patch)
tree1dab93f4e011bbe009f164c90d429e095b61ba67
parent0a674354b714248722d070c9a6dbafbde1a19557 (diff)
downloadmpv-562d86d95cbba67cb58358f6fc334553a467dee7.tar.bz2
mpv-562d86d95cbba67cb58358f6fc334553a467dee7.tar.xz
demux: Increase max buffered packet bytes from 8 to 128 MiB
The hard limit on the amount of buffered bytes per demuxer stream had not been increased since 2001. Since then there have been significant increases in both video bitrates (so it's easier to hit the limit) and typical memory available on a computer (so there's less reason to limit the memory used for buffering). The 8 MiB limit was too easy to hit in the case of high-bitrate video lagging behind audio, when the file is demuxed ahead to get audio packets but video has to be buffered until the decoder catches up to that point. Increase the limit to 128 MiB and remove the #ifdef for CONFIG_TV_BSDBT848 because the normal limit is now higher than the increased value under the #ifdef.
-rw-r--r--libmpdemux/demuxer.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index db44a33ca4..82e1577018 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -11,11 +11,7 @@
struct MPOpts;
#define MAX_PACKS 4096
-#ifdef CONFIG_TV_BSDBT848
-#define MAX_PACK_BYTES 0x2000000
-#else
-#define MAX_PACK_BYTES 0x800000
-#endif
+#define MAX_PACK_BYTES 0x8000000 // 128 MiB
#define DEMUXER_TYPE_UNKNOWN 0
#define DEMUXER_TYPE_MPEG_ES 1