diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-12-25 13:28:05 +0100 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-12-25 13:28:05 +0100 |
commit | b3d670a3e1ee9c60be33b6e5fafdf3b6449b5762 (patch) | |
tree | 341f80d55bf200c6bb195f77ce50a2fd1f030345 /stream | |
parent | 1d4273cfb52043c8165b85e9d7ac7bc14cb59cba (diff) | |
parent | 1c761bd6f59c369e45037e80f781429da65734c3 (diff) | |
download | mpv-b3d670a3e1ee9c60be33b6e5fafdf3b6449b5762.tar.bz2 mpv-b3d670a3e1ee9c60be33b6e5fafdf3b6449b5762.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.c | 6 | ||||
-rw-r--r-- | stream/stream.h | 1 | ||||
-rw-r--r-- | stream/stream_bluray.c | 3 | ||||
-rw-r--r-- | stream/stream_dvd.c | 3 | ||||
-rw-r--r-- | stream/stream_dvdnav.c | 3 | ||||
-rw-r--r-- | stream/tv.c | 4 | ||||
-rw-r--r-- | stream/tv.h | 2 |
7 files changed, 19 insertions, 3 deletions
diff --git a/stream/stream.c b/stream/stream.c index c936c5c77e..4c7aa04844 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -230,6 +230,12 @@ static int open_internal(const stream_info_t *sinfo, const char *url, int flags, s->is_network = sinfo->is_network; s->mode = flags & (STREAM_READ | STREAM_WRITE); + if (global->config) { + int opt; + mp_read_option_raw(global, "access-references", &m_option_type_flag, &opt); + s->access_references = opt; + } + MP_VERBOSE(s, "Opening %s\n", url); if ((s->mode & STREAM_WRITE) && !sinfo->can_write) { diff --git a/stream/stream.h b/stream/stream.h index 4444da8ed3..7d44e30eae 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -197,6 +197,7 @@ typedef struct stream { bool fast_skip : 1; // consider stream fast enough to fw-seek by skipping bool is_network : 1; // original stream_info_t.is_network flag bool allow_caching : 1; // stream cache makes sense + bool access_references : 1; // open other streams struct mp_log *log; struct mpv_global *global; diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index 26a78e5f21..5f083954c2 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -569,6 +569,9 @@ static int bdmv_dir_stream_open(stream_t *stream) .cfg_title = BLURAY_DEFAULT_TITLE, }; + if (!stream->access_references) + goto unsupported; + char *path = mp_file_get_path(priv, bstr0(stream->url)); if (!path) goto unsupported; diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index 4b423de630..338c23633c 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -951,6 +951,9 @@ static int ifo_stream_open(stream_t *stream) dvd_priv_t *priv = talloc_zero(stream, dvd_priv_t); stream->priv = priv; + if (!stream->access_references) + goto unsupported; + char *path = mp_file_get_path(priv, bstr0(stream->url)); if (!path) goto unsupported; diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index ec15c83b20..1178f50857 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -562,6 +562,9 @@ static int ifo_dvdnav_stream_open(stream_t *stream) struct priv *priv = talloc_zero(stream, struct priv); stream->priv = priv; + if (!stream->access_references) + goto unsupported; + priv->track = TITLE_LONGEST; char *path = mp_file_get_path(priv, bstr0(stream->url)); diff --git a/stream/tv.c b/stream/tv.c index b2bf150e1f..0b34b566d8 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -74,7 +74,7 @@ const struct m_sub_options tv_params_conf = { OPT_INT("audiorate", audiorate, 0), OPT_STRING("driver", driver, 0), OPT_STRING("device", device, 0), - OPT_STRING("freq", freq, 0), + OPT_FLOAT("freq", freq, 0), OPT_STRING("channel", channel, 0), OPT_STRING("chanlist", chanlist, 0), OPT_STRING("norm", norm, 0), @@ -602,7 +602,7 @@ int open_tv(tvi_handle_t *tvh) /* we need to set frequency */ if (tvh->tv_param->freq) { - unsigned long freq = atof(tvh->tv_param->freq)*16; + unsigned long freq = tvh->tv_param->freq * 16; /* set freq in MHz */ funcs->control(tvh->priv, TVI_CONTROL_TUN_SET_FREQ, &freq); diff --git a/stream/tv.h b/stream/tv.h index d22b5b7076..434a52d4fd 100644 --- a/stream/tv.h +++ b/stream/tv.h @@ -27,7 +27,7 @@ struct mp_log; typedef struct tv_params { - char *freq; + float freq; char *channel; char *chanlist; char *norm; |