diff options
Diffstat (limited to 'audio/filter/af.c')
-rw-r--r-- | audio/filter/af.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index 7ff3b49ae8..ac1b4926d8 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -59,9 +59,7 @@ static const struct af_info *const filter_list[] = { &af_info_rubberband, #endif &af_info_scaletempo, -#if HAVE_LIBAVFILTER &af_info_lavfi, -#endif NULL }; @@ -166,6 +164,7 @@ static struct af_instance *af_create(struct af_stream *s, char *name, .info = desc.p, .data = talloc_zero(af, struct mp_audio), .log = mp_log_new(af, s->log, name), + .opts = s->opts, .replaygain_data = s->replaygain_data, .out_pool = mp_audio_pool_create(af), }; @@ -695,6 +694,17 @@ int af_control_by_label(struct af_stream *s, int cmd, void *arg, bstr label) } } +int af_send_command(struct af_stream *s, char *label, char *cmd, char *arg) +{ + char *args[2] = {cmd, arg}; + if (strcmp(label, "all") == 0) { + af_control_all(s, AF_CONTROL_COMMAND, args); + return 0; + } else { + return af_control_by_label(s, AF_CONTROL_COMMAND, args, bstr0(label)); + } +} + // Used by filters to add a filtered frame to the output queue. // Ownership of frame is transferred from caller to the filter chain. void af_add_output_frame(struct af_instance *af, struct mp_audio *frame) |