summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af_format.c')
-rw-r--r--audio/filter/af_format.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/audio/filter/af_format.c b/audio/filter/af_format.c
index 79d78d1d96..eddce6422f 100644
--- a/audio/filter/af_format.c
+++ b/audio/filter/af_format.c
@@ -30,7 +30,7 @@ struct f_opts {
int out_srate;
struct m_channels out_channels;
- int fail;
+ bool fail;
};
struct priv {
@@ -38,7 +38,7 @@ struct priv {
struct mp_pin *in_pin;
};
-static void process(struct mp_filter *f)
+static void af_format_process(struct mp_filter *f)
{
struct priv *p = f->priv;
@@ -85,7 +85,7 @@ error:
static const struct mp_filter_info af_format_filter = {
.name = "format",
.priv_size = sizeof(struct priv),
- .process = process,
+ .process = af_format_process,
};
static struct mp_filter *af_format_create(struct mp_filter *parent,
@@ -130,10 +130,12 @@ const struct mp_user_filter_entry af_format = {
.options = (const struct m_option[]) {
{"format", OPT_AUDIOFORMAT(in_format)},
{"srate", OPT_INT(in_srate), M_RANGE(1000, 8*48000)},
- {"channels", OPT_CHANNELS(in_channels), .min = 1},
+ {"channels", OPT_CHANNELS(in_channels),
+ .flags = M_OPT_CHANNELS_LIMITED},
{"out-srate", OPT_INT(out_srate), M_RANGE(1000, 8*48000)},
- {"out-channels", OPT_CHANNELS(out_channels), .min = 1},
- {"fail", OPT_FLAG(fail)},
+ {"out-channels", OPT_CHANNELS(out_channels),
+ .flags = M_OPT_CHANNELS_LIMITED},
+ {"fail", OPT_BOOL(fail)},
{0}
},
},