diff options
author | wm4 <wm4@nowhere> | 2013-11-09 23:18:24 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-09 23:32:52 +0100 |
commit | 65571dd0d543ced01fc2d10f1fcb8fea933f1e9b (patch) | |
tree | 2e811a945cad2db62f9fd0b88497d0d735d35fb2 /audio | |
parent | a3e2019c2d0e5157c3a744be00db3a9ca255aae7 (diff) | |
download | mpv-65571dd0d543ced01fc2d10f1fcb8fea933f1e9b.tar.bz2 mpv-65571dd0d543ced01fc2d10f1fcb8fea933f1e9b.tar.xz |
af: allow filters to return AF_OK, even if format doesn't match
This should allow to make format negotiation much simpler, since it
takes the responsibility to compare actual input and accepted input
formats from the filters. It's also backwards compatible. Filters which
have expensive initialization still can use the old method.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/filter/af.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/filter/af.c b/audio/filter/af.c index 9c39173f1b..cfe4b401df 100644 --- a/audio/filter/af.c +++ b/audio/filter/af.c @@ -527,6 +527,8 @@ static int af_reinit(struct af_stream *s) in.len = 0; int rv = af->control(af, AF_CONTROL_REINIT, &in); + if (rv == AF_OK && !mp_audio_config_equals(&in, af->prev->data)) + rv = AF_FALSE; // conversion filter needed switch (rv) { case AF_OK: af = af->next; |