diff options
author | wm4 <wm4@nowhere> | 2018-01-24 01:32:56 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-25 20:18:32 -0800 |
commit | 11f5713e3bbeea8449a97ecb979936e02660321e (patch) | |
tree | ea8ee4886ca914a9185b0b2bd9bee68fd011869c /demux/demux.c | |
parent | cabfbc34b539c06ae37745a200996bd351b64cf5 (diff) | |
download | mpv-11f5713e3bbeea8449a97ecb979936e02660321e.tar.bz2 mpv-11f5713e3bbeea8449a97ecb979936e02660321e.tar.xz |
options: add an option type for byte sizes
And use it for 2 demuxer options. It could be used for more options
later. (Though the --cache options can not use this, because they use KB
as base unit.)
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/demux/demux.c b/demux/demux.c index d621b9d869..ed6f2c1b31 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -84,8 +84,8 @@ const demuxer_desc_t *const demuxer_list[] = { }; struct demux_opts { - int max_bytes; - int max_bytes_bw; + int64_t max_bytes; + int64_t max_bytes_bw; double min_secs; int force_seekable; double min_secs_cache; @@ -99,8 +99,8 @@ struct demux_opts { const struct m_sub_options demux_conf = { .opts = (const struct m_option[]){ OPT_DOUBLE("demuxer-readahead-secs", min_secs, M_OPT_MIN, .min = 0), - OPT_INTRANGE("demuxer-max-bytes", max_bytes, 0, 0, INT_MAX), - OPT_INTRANGE("demuxer-max-back-bytes", max_bytes_bw, 0, 0, INT_MAX), + OPT_BYTE_SIZE("demuxer-max-bytes", max_bytes, 0, 0, INT_MAX), + OPT_BYTE_SIZE("demuxer-max-back-bytes", max_bytes_bw, 0, 0, INT_MAX), OPT_FLAG("force-seekable", force_seekable, 0), OPT_DOUBLE("cache-secs", min_secs_cache, M_OPT_MIN, .min = 0), OPT_FLAG("access-references", access_references, 0), |