1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00

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.
This commit is contained in:
wm4 2013-11-09 23:18:24 +01:00
parent a3e2019c2d
commit 65571dd0d5

View File

@ -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;