summaryrefslogtreecommitdiffstats
path: root/stream
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 /stream
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 'stream')
-rw-r--r--stream/stream.h1
-rw-r--r--stream/stream_dvb.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 863c0cfd3c..2f59e5318f 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -184,6 +184,7 @@ typedef struct stream {
bool is_local_file : 1; // from the filesystem
bool is_directory : 1; // directory on the filesystem
bool access_references : 1; // open other streams
+ bool extended_ctrls : 1; // supports some of BD/DVD/DVB/TV controls
struct mp_log *log;
struct mpv_global *global;
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index 02c5878ca9..9821119cac 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -1120,6 +1120,7 @@ static int dvb_open(stream_t *stream)
stream->allow_caching = true;
stream->demuxer = "lavf";
stream->lavf_type = "mpegts";
+ stream->extended_ctrls = true;
return STREAM_OK;