mpv/DOCS/man
wm4 dbcd654e61 player: make playback termination asynchronous
Until now, stopping playback aborted the demuxer and I/O layer violently
by signaling mp_cancel (bound to libavformat's AVIOInterruptCB
mechanism). Change it to try closing them gracefully.

The main purpose is to silence those libavformat errors that happen when
you request termination. Most of libavformat barely cares about the
termination mechanism (AVIOInterruptCB), and essentially it's like the
network connection is abruptly severed, or file I/O suddenly returns I/O
errors. There were issues with dumb TLS warnings, parsers complaining
about incomplete data, and some special protocols that require server
communication to gracefully disconnect.

We still want to abort it forcefully if it refuses to terminate on its
own, so a timeout is required. Users can set the timeout to 0, which
should give them the old behavior.

This also removes the old mechanism that treats certain commands (like
"quit") specially, and tries to terminate the demuxers even if the core
is currently frozen. This is for situations where the core synchronized
to the demuxer or stream layer while network is unresponsive. This in
turn can only happen due to the "program" or "cache-size" properties in
the current code (see one of the previous commits). Also, the old
mechanism doesn't fit particularly well with the new one. We wouldn't
want to abort playback immediately on a "quit" command - the new code is
all about giving it a chance to end it gracefully. We'd need some sort
of watchdog thread or something equally complicated to handle this. So
just remove it.

The change in osd.c is to prevent that it clears the status line while
waiting for termination. The normal status line code doesn't output
anything useful at this point, and the code path taken clears it, both
of which is an annoying behavior change, so just let it show the old
one.
2018-05-24 19:56:35 +02:00
..
af.rst f_lavfi: add an option to use old audio PTS handling for af_lavfi 2018-04-15 23:11:33 +03:00
ao.rst ao_pulse: reduce requested device buffer size 2018-04-15 23:11:33 +03:00
changes.rst
encode.rst encode: remove old timestamp handling 2018-05-03 01:08:44 +03:00
input.rst input: slightly improve --input-cmdlist output 2018-05-24 19:56:34 +02:00
ipc.rst json: add some non-standard extensions 2018-05-24 19:56:34 +02:00
javascript.rst js: implement mp.register_idle 2018-04-07 16:02:19 -07:00
libmpv.rst
lua.rst lua: expose mpv_abort_async_command() 2018-05-24 19:56:34 +02:00
mpv.rst manpage: mention that fd:// file descriptors may be modified 2018-05-24 19:56:34 +02:00
options.rst player: make playback termination asynchronous 2018-05-24 19:56:35 +02:00
osc.rst config: replace config dir lua-settings/ with dir script-opts/ 2018-04-07 16:02:16 -07:00
stats.rst config: replace config dir lua-settings/ with dir script-opts/ 2018-04-07 16:02:16 -07:00
vf.rst vf_vavpp: select best quality deinterlacing algorithm by default 2018-02-13 17:45:29 -08:00
vo.rst docs/vo: fixup some minor typos a la "planed" instead of "plane" 2018-05-01 20:49:30 +03:00