summaryrefslogtreecommitdiffstats
path: root/demux/demux_disc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-19 12:08:48 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:35 +0200
commitd7ca95c3ea90782c786a6a607d3713bb42a104b1 (patch)
treebff2d05fc0720e23686a896825626afba830be21 /demux/demux_disc.c
parentb6214b2644148bf68ae781983ed81f972ebc5137 (diff)
downloadmpv-d7ca95c3ea90782c786a6a607d3713bb42a104b1.tar.bz2
mpv-d7ca95c3ea90782c786a6a607d3713bb42a104b1.tar.xz
command: whitelist some blocking accesses for certain demuxers/streams
The properties/commands touched in this commit are all for obscure special inputs (BD/DVD/DVB/TV), and they all block on the demuxer/stream layer. For network streams, this blocking is very unwelcome. They will affect playback and probably introduce pauses and frame drops. The player can even freeze fully, and the logic that tries to make playback abortable even if frozen complicates the player. Since the mentioned accesses are not needed for network streams, but they will block on network streams even though they're going to fail, add a flag that coarsely enables/disables these accesses. Essentially it establishes a whitelist of demuxers/streams which support them. In theory you could to access BD/DVD images over network (or add such support, I don't think it's a thing in mpv). In these cases these controls still can block and could even "freeze" the player completely. Writing to the "program" and "cache-size" properties still can block even for network streams. Just don't use them if you don't want freezes.
Diffstat (limited to 'demux/demux_disc.c')
-rw-r--r--demux/demux_disc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/demux/demux_disc.c b/demux/demux_disc.c
index 6ab17e69c8..2b81350ea4 100644
--- a/demux/demux_disc.c
+++ b/demux/demux_disc.c
@@ -342,6 +342,8 @@ static int d_open(demuxer_t *demuxer, enum demux_check check)
if (stream_control(demuxer->stream, STREAM_CTRL_GET_TIME_LENGTH, &len) >= 1)
demuxer->duration = len;
+ demuxer->extended_ctrls = true;
+
return 0;
}