diff options
author | wm4 <wm4@nowhere> | 2020-02-27 22:16:30 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-27 22:30:46 +0100 |
commit | b56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc (patch) | |
tree | 2e2e0bfd88f0f5b6febb2c1fd35579e4ef9de9a1 /DOCS | |
parent | 611c92ef1db2efa5c2f548c8ae3aa4072bbe67a8 (diff) | |
download | mpv-b56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc.tar.bz2 mpv-b56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc.tar.xz |
demux: simplify some internals, stop trying to read packets after EOF
Remove some redundant fields that controlled or indicated whether the
demuxer was/could/should prefetch. Redefine how the eof/reading fields
work.
The in->eof field is now always valid, instead of weirdly being reset to
false in random situations. The in->reading field now corresponds to
whether the demuxer thread is working at all, and is reset if it stops
doing anything.
Also, I always found it stupid that dequeue_packet() forced the demuxer
thread to retry reading if it was EOF. This makes little sense, but was
probably added for files that are being appended to (running downloads).
It makes no sense, because if the cache really tried to read until file
EOF, it would encounter partial packets and throw errors, so all is lost
anyway. Plus stream_file now handles this better. So stop this behavior,
but add a temporary option that enables the old behavior.
I think checking for ds->eager when enabling prefetching never really
made sense (could be debated, but no, not really). On the other hand,
the change above exposed a missing wakeup in the backward demuxing code.
Some chances of regressions that could make it stuck in certain states
or so, or incorrect demuxer cache state reporting to the player
frontend.
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/man/options.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index c68df5951c..6e2dc5498a 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3528,6 +3528,16 @@ Demuxer ``--cache-secs`` is used (i.e. when the stream appears to be a network stream or the stream cache is enabled). +``--demuxer-force-retry-on-eof=<yes|no>`` + Whether to keep retrying making the demuxer thread read more packets each + time the decoder dequeues a packet, even if the end of the file was reached + (default: no). This does not really make sense, but was the default behavior + in mpv 0.32.0 and earlier. This option will be silently removed after a + while, and exists only to restore the old behavior for testing, in case this + was actually needed somewhere. This does _not_ help with files that are + being appended to (in these cases use ``appending://``, or disable the + cache). + ``--demuxer-thread=<yes|no>`` Run the demuxer in a separate thread, and let it prefetch a certain amount of packets (default: yes). Having this enabled leads to smoother playback, |