From 11f5713e3bbeea8449a97ecb979936e02660321e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 24 Jan 2018 01:32:56 +0100 Subject: 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.) --- demux/demux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'demux/demux.c') 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), -- cgit v1.2.3