diff options
author | wm4 <wm4@nowhere> | 2014-08-16 17:09:08 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-16 17:15:51 +0200 |
commit | 925c431ff7f68a7ea8b1fc0cd260edcf8b88fdc1 (patch) | |
tree | b6e161b58cd714a62361e0bf3d8e9877d0352c58 | |
parent | b822faa6cfdae2c530d68f257a811c6184d237a6 (diff) | |
download | mpv-925c431ff7f68a7ea8b1fc0cd260edcf8b88fdc1.tar.bz2 mpv-925c431ff7f68a7ea8b1fc0cd260edcf8b88fdc1.tar.xz |
demux: enable thread by default
And change the defaults for the other queue options to reduce latency.
-rw-r--r-- | DOCS/man/options.rst | 4 | ||||
-rw-r--r-- | demux/demux.h | 5 | ||||
-rw-r--r-- | options/options.c | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index edbbc35419..01aaaefe6c 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2046,7 +2046,9 @@ Demuxer ``--demuxer-thread=<yes|no>`` Run the demuxer in a separate thread, and let it prefetch a certain amount - of packets (default: no). + of packets (default: yes). Having this enabled may lead to smoother + playback, but on the other hand can add delays to seeking or track + switching. ``--demuxer-readahead-secs=N`` If ``--demuxer-thread`` is enabled, this controls how much the demuxer diff --git a/demux/demux.h b/demux/demux.h index 2f93ec10bf..92ef461077 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -35,11 +35,6 @@ // and the demuxer pretends EOF was reached. #define MAX_PACKS 16000 #define MAX_PACK_BYTES (400 * 1024 * 1024) -// Minimum total size of packets queued - the demuxer thread will read more -// packets, until either number or total size of the packets exceed the minimum. -// This can actually be configured with command line options. -#define MIN_PACKS 64 -#define MIN_PACK_BYTES (5 * 1024 * 1024) enum demuxer_type { DEMUXER_TYPE_GENERIC = 0, diff --git a/options/options.c b/options/options.c index c96f6578b6..413125977a 100644 --- a/options/options.c +++ b/options/options.c @@ -598,9 +598,9 @@ const struct MPOpts mp_default_opts = { }, .stream_cache_pause = 50, .stream_cache_unpause = 100, - .demuxer_thread = 0, - .demuxer_min_packs = MIN_PACKS, - .demuxer_min_bytes = MIN_PACK_BYTES, + .demuxer_thread = 1, + .demuxer_min_packs = 0, + .demuxer_min_bytes = 0, .demuxer_min_secs = 0.2, .network_rtsp_transport = 2, .chapterrange = {-1, -1}, |