summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.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 /demux/demux_lavf.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 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index f4d3f96fdf..efe7f45ae9 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -76,14 +76,14 @@ struct demux_lavf_opts {
int probescore;
float analyzeduration;
int buffersize;
- int allow_mimetype;
+ bool allow_mimetype;
char *format;
char **avopts;
- int hacks;
+ bool hacks;
char *sub_cp;
int rtsp_transport;
int linearize_ts;
- int propagate_opts;
+ bool propagate_opts;
};
const struct m_sub_options demux_lavf_conf = {
@@ -96,10 +96,10 @@ const struct m_sub_options demux_lavf_conf = {
M_RANGE(0, 3600)},
{"demuxer-lavf-buffersize", OPT_INT(buffersize),
M_RANGE(1, 10 * 1024 * 1024), OPTDEF_INT(BIO_BUFFER_SIZE)},
- {"demuxer-lavf-allow-mimetype", OPT_FLAG(allow_mimetype)},
+ {"demuxer-lavf-allow-mimetype", OPT_BOOL(allow_mimetype)},
{"demuxer-lavf-probescore", OPT_INT(probescore),
M_RANGE(1, AVPROBE_SCORE_MAX)},
- {"demuxer-lavf-hacks", OPT_FLAG(hacks)},
+ {"demuxer-lavf-hacks", OPT_BOOL(hacks)},
{"demuxer-lavf-o", OPT_KEYVALUELIST(avopts)},
{"sub-codepage", OPT_STRING(sub_cp)},
{"rtsp-transport", OPT_CHOICE(rtsp_transport,
@@ -110,14 +110,14 @@ const struct m_sub_options demux_lavf_conf = {
{"udp_multicast", 4})},
{"demuxer-lavf-linearize-timestamps", OPT_CHOICE(linearize_ts,
{"no", 0}, {"auto", -1}, {"yes", 1})},
- {"demuxer-lavf-propagate-opts", OPT_FLAG(propagate_opts)},
+ {"demuxer-lavf-propagate-opts", OPT_BOOL(propagate_opts)},
{0}
},
.size = sizeof(struct demux_lavf_opts),
.defaults = &(const struct demux_lavf_opts){
.probeinfo = -1,
- .allow_mimetype = 1,
- .hacks = 1,
+ .allow_mimetype = true,
+ .hacks = true,
// AVPROBE_SCORE_MAX/4 + 1 is the "recommended" limit. Below that, the
// user is supposed to retry with larger probe sizes until a higher
// value is reached.
@@ -125,7 +125,7 @@ const struct m_sub_options demux_lavf_conf = {
.sub_cp = "auto",
.rtsp_transport = 2,
.linearize_ts = -1,
- .propagate_opts = 1,
+ .propagate_opts = true,
},
};