path: root/core/command.c
diff options
authorwm4 <wm4@nowhere>2013-03-23 13:02:59 +0100
committerwm4 <wm4@nowhere>2013-04-13 04:21:27 +0200
commit5a958921a738f2cd928f8339872b74a3c299ff0e (patch)
tree751da3be0e1b48f987cc3f38d30f381b34e38ee6 /core/command.c
parent0a136ece5aa6c3004cc6e7b778f889fb6aa82633 (diff)
af: remove automatically inserted filters on full reinit
Make sure automatically inserted filters are removed on full reinit (they are re-added later if they are really needed). Automatically inserted filters were never explicitly removed, instead, it was expected that redundant conversion filters detach themselves. This didn't work if there were several chained format conversion filters, e.g. s16le->floatle->s16le, which could result from repeated filter insertion and removal. (format filters detach only if input format and output format are the same.) Further, the dummy filter (which exists only because af.c can't handle an empty filter chain for some reason) could introduce bad conversions due to how the format negotiation works. Change the code so that the dummy filter never takes part on format negotiation. (It would be better to fix format negotiation, but that would be much more complicated and would involving fixing all filters.) Simplify af_reinit() and remove the start audio filter parameter. This means format negotiation and filter initialization is run more often, but should be harmless.
Diffstat (limited to 'core/command.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/core/command.c b/core/command.c
index 8f6dfeb4ca..641dfb80e0 100644
--- a/core/command.c
+++ b/core/command.c
@@ -2274,7 +2274,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
af->control(af, AF_CONTROL_COMMAND_LINE, cmd->args[1].v.s);
- af_reinit(sh_audio->afilter, af);
+ af_reinit(sh_audio->afilter);