avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channels

The decoders in this set either have a fixed channel count, or read it
from the bitstream, and thus do not require the channel count as
external information.

Fixes various regressions since
81503ac58a, which requires a valid channel
count for decoders which do not set this capability.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes 2020-12-05 11:41:23 +01:00
parent 412c3b37a4
commit 494f868e93
44 changed files with 49 additions and 49 deletions

View file

@ -189,7 +189,7 @@ AVCodec ff_libcodec2_decoder = {
.init = libcodec2_init_decoder,
.close = libcodec2_close,
.decode = libcodec2_decode,
.capabilities = 0,
.capabilities = AV_CODEC_CAP_CHANNEL_CONF,
.supported_samplerates = (const int[]){ 8000, 0 },
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE },
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },