summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_coreaudio_chmap.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-26 15:51:26 +0100
committerwm4 <wm4@nowhere>2015-10-26 15:51:26 +0100
commitfa510bd00cc62646255123504b3bfd4fc491f6bc (patch)
treef5db46fa480a4cc508ad87fc43e530689b12c43e /audio/out/ao_coreaudio_chmap.c
parentc21c26472c918947c4cc060ab06bd2a470db3068 (diff)
downloadmpv-fa510bd00cc62646255123504b3bfd4fc491f6bc.tar.bz2
mpv-fa510bd00cc62646255123504b3bfd4fc491f6bc.tar.xz
af: prevent endless loop when removing filters due to spdif
This code removes filters which can not take spdif inout. This was made so that PCM filters are transparently dropped in spdif mode. This entered an endless loop with: --af=lavcac3enc:::2 --audio-channels=5.1 The forced number of output channels is incompatible with spdif. It's trying to insert af_lavrresample as conversion filter to compensate for it. Of course this doesn't work, which triggers the PCM filter removal. Then it goes on normally - since the new state is exactly as before, it will try the same thing again, forever. Fix by reusing the retry counter, which is a very dumb but very effective measure against these cases of filter negotiation failure. We could try to be more clever (for example, if the removed filter is a conversion filter, we can be sure this won't work, and error out immediately). But better keep it simple and robust.
Diffstat (limited to 'audio/out/ao_coreaudio_chmap.c')
0 files changed, 0 insertions, 0 deletions