summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-02-20 04:32:50 +0100
committerDudemanguy <random342@airmail.cc>2023-02-21 17:15:17 +0000
commit91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29 (patch)
tree448b141d92c9ea7636954213b587aaf380fc21db /stream/stream.c
parentb9850a6e8c45f95563a703af7f21dfe1c1ee40b6 (diff)
downloadmpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.bz2
mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.xz
options: transition options from OPT_FLAG to OPT_BOOL
c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type as a replacement for the flag type, but didn't actually transition and remove the flag type because it would have been too much mundane work.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 436bc7f779..263c7f5e72 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -103,7 +103,7 @@ static const stream_info_t *const stream_list[] = {
struct stream_opts {
int64_t buffer_size;
- int load_unsafe_playlists;
+ bool load_unsafe_playlists;
};
#define OPT_BASE_STRUCT struct stream_opts
@@ -112,7 +112,7 @@ const struct m_sub_options stream_conf = {
.opts = (const struct m_option[]){
{"stream-buffer-size", OPT_BYTE_SIZE(buffer_size),
M_RANGE(STREAM_MIN_BUFFER_SIZE, STREAM_MAX_BUFFER_SIZE)},
- {"load-unsafe-playlists", OPT_FLAG(load_unsafe_playlists)},
+ {"load-unsafe-playlists", OPT_BOOL(load_unsafe_playlists)},
{0}
},
.size = sizeof(struct stream_opts),
@@ -353,8 +353,8 @@ static int stream_create_instance(const stream_info_t *sinfo,
if (flags & STREAM_LESS_NOISE)
mp_msg_set_max_level(s->log, MSGL_WARN);
- int opt;
- mp_read_option_raw(s->global, "access-references", &m_option_type_flag, &opt);
+ bool opt;
+ mp_read_option_raw(s->global, "access-references", &m_option_type_bool, &opt);
s->access_references = opt;
MP_VERBOSE(s, "Opening %s\n", url);