From bc1a18ee245ec2243d4b7b0fa22894f4326b3758 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 Apr 2020 11:27:38 +0200 Subject: options: cleanup .min use for OPT_CHANNELS Replace use of .min==1 with a proper flag. This is a good idea, because it has nothing to do with numeric limits (also see commit 9d32d62b61547 for how this can go wrong). With this, m_option.min/max are strictly used for numeric limits. --- demux/demux_raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux_raw.c b/demux/demux_raw.c index e606a24c9f..edc89e7418 100644 --- a/demux/demux_raw.c +++ b/demux/demux_raw.c @@ -54,7 +54,7 @@ struct demux_rawaudio_opts { #define OPT_BASE_STRUCT struct demux_rawaudio_opts const struct m_sub_options demux_rawaudio_conf = { .opts = (const m_option_t[]) { - {"channels", OPT_CHANNELS(channels), .min = 1}, + {"channels", OPT_CHANNELS(channels), .flags = M_OPT_CHANNELS_LIMITED}, {"rate", OPT_INT(samplerate), M_RANGE(1000, 8 * 48000)}, {"format", OPT_CHOICE(aformat, {"u8", PCM(0, 0, 8, 0)}, -- cgit v1.2.3