mpv/options
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
..
m_config.c options: minor cleanup to --no-... handling 2018-02-13 17:45:29 -08:00
m_config.h options: simplify mp_get_config_group() memory management 2018-01-18 00:59:07 -08:00
m_option.c encode: get rid of AVDictionary setter helper 2018-04-29 02:21:32 +03:00
m_option.h command: add a subprocess command 2018-05-24 19:56:34 +02:00
m_property.c command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
m_property.h command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
options.c player: make playback termination asynchronous 2018-05-24 19:56:35 +02:00
options.h player: make playback termination asynchronous 2018-05-24 19:56:35 +02:00
parse_commandline.c command: make loadlist command async and abortable 2018-05-24 19:56:35 +02:00
parse_commandline.h
parse_configfile.c
parse_configfile.h
path.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00
path.h