diff mbox series

[FFmpeg-devel] avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channels

Message ID 20201205104123.1902-1-h.leppkes@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channels
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Hendrik Leppkes Dec. 5, 2020, 10:41 a.m. UTC
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
81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel
count for decoders which do not set this capability.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
---
 libavcodec/alac.c            | 2 +-
 libavcodec/alsdec.c          | 2 +-
 libavcodec/amrnbdec.c        | 2 +-
 libavcodec/amrwbdec.c        | 2 +-
 libavcodec/atrac9dec.c       | 2 +-
 libavcodec/audiotoolboxdec.c | 2 +-
 libavcodec/bmvaudio.c        | 2 +-
 libavcodec/cngdec.c          | 2 +-
 libavcodec/dsicinaudio.c     | 2 +-
 libavcodec/dss_sp.c          | 2 +-
 libavcodec/evrcdec.c         | 2 +-
 libavcodec/g722dec.c         | 2 +-
 libavcodec/g726.c            | 4 ++--
 libavcodec/gsmdec.c          | 4 ++--
 libavcodec/ilbcdec.c         | 2 +-
 libavcodec/imc.c             | 2 +-
 libavcodec/libcodec2.c       | 2 +-
 libavcodec/libgsmdec.c       | 4 ++--
 libavcodec/libilbc.c         | 2 +-
 libavcodec/libopencore-amr.c | 4 ++--
 libavcodec/libopusdec.c      | 2 +-
 libavcodec/libspeexdec.c     | 2 +-
 libavcodec/libvorbisdec.c    | 2 +-
 libavcodec/metasound.c       | 2 +-
 libavcodec/mlpdec.c          | 4 ++--
 libavcodec/mpc8.c            | 2 +-
 libavcodec/nellymoserdec.c   | 2 +-
 libavcodec/opusdec.c         | 2 +-
 libavcodec/pcm-bluray.c      | 2 +-
 libavcodec/qcelpdec.c        | 2 +-
 libavcodec/qdm2.c            | 2 +-
 libavcodec/qdmc.c            | 2 +-
 libavcodec/ra144dec.c        | 2 +-
 libavcodec/ra288.c           | 2 +-
 libavcodec/sbcdec.c          | 2 +-
 libavcodec/sipr.c            | 2 +-
 libavcodec/sonic.c           | 2 +-
 libavcodec/takdec.c          | 2 +-
 libavcodec/tta.c             | 2 +-
 libavcodec/twinvqdec.c       | 2 +-
 libavcodec/vima.c            | 2 +-
 libavcodec/vorbisdec.c       | 2 +-
 libavcodec/wavpack.c         | 2 +-
 libavcodec/ws-snd1.c         | 2 +-
 44 files changed, 49 insertions(+), 49 deletions(-)

Comments

Michael Niedermayer Dec. 5, 2020, 10:44 p.m. UTC | #1
On Sat, Dec 05, 2020 at 11:41:23AM +0100, Hendrik Leppkes wrote:
> 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
> 81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel
> count for decoders which do not set this capability.

patch probably ok

its a bit concerning that all these where missed by fate though

Thanks

[...]
Andreas Rheinhardt Dec. 5, 2020, 10:51 p.m. UTC | #2
Michael Niedermayer:
> On Sat, Dec 05, 2020 at 11:41:23AM +0100, Hendrik Leppkes wrote:
>> 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
>> 81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel
>> count for decoders which do not set this capability.
> 
> patch probably ok
> 
> its a bit concerning that all these where missed by fate though
> 
I noticed that mlp/truehd now gave warnings, but somehow the tests
nevertheless worked. Still don't know why.

- Andreas
Hendrik Leppkes Dec. 5, 2020, 11:37 p.m. UTC | #3
On Sat, Dec 5, 2020 at 11:44 PM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Sat, Dec 05, 2020 at 11:41:23AM +0100, Hendrik Leppkes wrote:
> > 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
> > 81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel
> > count for decoders which do not set this capability.
>
> patch probably ok
>
> its a bit concerning that all these where missed by fate though
>

I primarily noticed this with pcm-bluray, which is in mpeg-ts and thus
has no container-level headers to fill in the missing information. Not
sure if we simply don't have that in FATE.
But any other of these codecs could theoretically suffer from this if
container info is missing, or avcodec is not fed the information by
eg. an API user.

- Hendrik
Paul B Mahol Dec. 8, 2020, 11:23 a.m. UTC | #4
LGTM
diff mbox series

Patch

diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 9040673528..7edbb06a3e 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -625,7 +625,7 @@  AVCodec ff_alac_decoder = {
     .init           = alac_decode_init,
     .close          = alac_decode_close,
     .decode         = alac_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .priv_class     = &alac_class
 };
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index c2c460a29c..c318ad088e 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -2179,6 +2179,6 @@  AVCodec ff_als_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .flush          = flush,
-    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index ea299acd4e..8e02d4cb20 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -1088,7 +1088,7 @@  AVCodec ff_amrnb_decoder = {
     .priv_data_size = sizeof(AMRContext),
     .init           = amrnb_decode_init,
     .decode         = amrnb_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
                                                      AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 555c4bc45d..070f276904 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -1283,7 +1283,7 @@  AVCodec ff_amrwb_decoder = {
     .priv_data_size = sizeof(AMRWBContext),
     .init           = amrwb_decode_init,
     .decode         = amrwb_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
                                                      AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index a7de037b2c..dc1d785f63 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -977,5 +977,5 @@  AVCodec ff_atrac9_decoder = {
     .decode         = atrac9_decode_frame,
     .flush          = atrac9_decode_flush,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
-    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index 66055b79aa..19003f929e 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -595,7 +595,7 @@  static av_cold int ffat_close_decoder(AVCodecContext *avctx)
         .flush          = ffat_decode_flush, \
         .priv_class     = &ffat_##NAME##_dec_class, \
         .bsfs           = bsf_name, \
-        .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, \
+        .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
         .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \
         .wrapper_name   = "at", \
     };
diff --git a/libavcodec/bmvaudio.c b/libavcodec/bmvaudio.c
index b1587ab366..7c4dad7f8d 100644
--- a/libavcodec/bmvaudio.c
+++ b/libavcodec/bmvaudio.c
@@ -85,5 +85,5 @@  AVCodec ff_bmv_audio_decoder = {
     .id             = AV_CODEC_ID_BMV_AUDIO,
     .init           = bmv_aud_decode_init,
     .decode         = bmv_aud_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
index 747ab49cd0..ceee087c57 100644
--- a/libavcodec/cngdec.c
+++ b/libavcodec/cngdec.c
@@ -173,7 +173,7 @@  AVCodec ff_comfortnoise_decoder = {
     .close          = cng_decode_close,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE |
                       FF_CODEC_CAP_INIT_CLEANUP,
 };
diff --git a/libavcodec/dsicinaudio.c b/libavcodec/dsicinaudio.c
index 290dab41a5..3ee6c196d2 100644
--- a/libavcodec/dsicinaudio.c
+++ b/libavcodec/dsicinaudio.c
@@ -129,5 +129,5 @@  AVCodec ff_dsicinaudio_decoder = {
     .priv_data_size = sizeof(CinAudioContext),
     .init           = cinaudio_decode_init,
     .decode         = cinaudio_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/dss_sp.c b/libavcodec/dss_sp.c
index 14025fcdde..71da65cecd 100644
--- a/libavcodec/dss_sp.c
+++ b/libavcodec/dss_sp.c
@@ -781,5 +781,5 @@  AVCodec ff_dss_sp_decoder = {
     .priv_data_size = sizeof(DssSpContext),
     .init           = dss_sp_decode_init,
     .decode         = dss_sp_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/evrcdec.c b/libavcodec/evrcdec.c
index 8728c02a3b..00e342a1f6 100644
--- a/libavcodec/evrcdec.c
+++ b/libavcodec/evrcdec.c
@@ -935,7 +935,7 @@  AVCodec ff_evrc_decoder = {
     .id             = AV_CODEC_ID_EVRC,
     .init           = evrc_decode_init,
     .decode         = evrc_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_data_size = sizeof(EVRCContext),
     .priv_class     = &evrcdec_class,
 };
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index 7c270bc33a..8444d9a4bc 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -147,6 +147,6 @@  AVCodec ff_adpcm_g722_decoder = {
     .priv_data_size = sizeof(G722Context),
     .init           = g722_decode_init,
     .decode         = g722_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_class     = &g722_decoder_class,
 };
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 80cb064912..71f5791416 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -513,7 +513,7 @@  AVCodec ff_adpcm_g726_decoder = {
     .init           = g726_decode_init,
     .decode         = g726_decode_frame,
     .flush          = g726_decode_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
 #endif
 
@@ -526,7 +526,7 @@  AVCodec ff_adpcm_g726le_decoder = {
     .init           = g726_decode_init,
     .decode         = g726_decode_frame,
     .flush          = g726_decode_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .long_name      = NULL_IF_CONFIG_SMALL("G.726 ADPCM little-endian"),
 };
 #endif
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index cd56995183..bf3740aa5d 100644
--- a/libavcodec/gsmdec.c
+++ b/libavcodec/gsmdec.c
@@ -120,7 +120,7 @@  AVCodec ff_gsm_decoder = {
     .init           = gsm_init,
     .decode         = gsm_decode_frame,
     .flush          = gsm_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
 #endif
 #if CONFIG_GSM_MS_DECODER
@@ -133,6 +133,6 @@  AVCodec ff_gsm_ms_decoder = {
     .init           = gsm_init,
     .decode         = gsm_decode_frame,
     .flush          = gsm_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
 #endif
diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbcdec.c
index a82a27525c..33f4e2c1eb 100644
--- a/libavcodec/ilbcdec.c
+++ b/libavcodec/ilbcdec.c
@@ -1484,6 +1484,6 @@  AVCodec ff_ilbc_decoder = {
     .id             = AV_CODEC_ID_ILBC,
     .init           = ilbc_decode_init,
     .decode         = ilbc_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_data_size = sizeof(ILBCContext),
 };
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 70ad5b1dbd..2e5ff06e55 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -1088,7 +1088,7 @@  AVCodec ff_imc_decoder = {
     .close          = imc_decode_close,
     .decode         = imc_decode_frame,
     .flush          = flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/libcodec2.c b/libavcodec/libcodec2.c
index 8421f5b261..2164f36051 100644
--- a/libavcodec/libcodec2.c
+++ b/libavcodec/libcodec2.c
@@ -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 },
diff --git a/libavcodec/libgsmdec.c b/libavcodec/libgsmdec.c
index 89e1de0fed..1182afae6b 100644
--- a/libavcodec/libgsmdec.c
+++ b/libavcodec/libgsmdec.c
@@ -134,7 +134,7 @@  AVCodec ff_libgsm_decoder = {
     .close          = libgsm_decode_close,
     .decode         = libgsm_decode_frame,
     .flush          = libgsm_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .wrapper_name   = "libgsm",
 };
 #endif
@@ -149,7 +149,7 @@  AVCodec ff_libgsm_ms_decoder = {
     .close          = libgsm_decode_close,
     .decode         = libgsm_decode_frame,
     .flush          = libgsm_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .wrapper_name   = "libgsm",
 };
 #endif
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 9a56cc8785..08f951ac2d 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -111,7 +111,7 @@  AVCodec ff_libilbc_decoder = {
     .priv_data_size = sizeof(ILBCDecContext),
     .init           = ilbc_decode_init,
     .decode         = ilbc_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_class     = &ilbc_dec_class,
 };
 
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index 614b3a2218..f23bb48d5b 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -139,7 +139,7 @@  AVCodec ff_libopencore_amrnb_decoder = {
     .init           = amr_nb_decode_init,
     .close          = amr_nb_decode_close,
     .decode         = amr_nb_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
 #endif /* CONFIG_LIBOPENCORE_AMRNB_DECODER */
 
@@ -379,7 +379,7 @@  AVCodec ff_libopencore_amrwb_decoder = {
     .init           = amr_wb_decode_init,
     .close          = amr_wb_decode_close,
     .decode         = amr_wb_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .wrapper_name   = "libopencore_amrwb",
 };
 
diff --git a/libavcodec/libopusdec.c b/libavcodec/libopusdec.c
index 1724a49906..082a431c6c 100644
--- a/libavcodec/libopusdec.c
+++ b/libavcodec/libopusdec.c
@@ -235,7 +235,7 @@  AVCodec ff_libopus_decoder = {
     .close          = libopus_decode_close,
     .decode         = libopus_decode,
     .flush          = libopus_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
                                                      AV_SAMPLE_FMT_S16,
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index d67c68c7f9..b02582b380 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -199,6 +199,6 @@  AVCodec ff_libspeex_decoder = {
     .close          = libspeex_decode_close,
     .decode         = libspeex_decode_frame,
     .flush          = libspeex_decode_flush,
-    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .wrapper_name   = "libspeex",
 };
diff --git a/libavcodec/libvorbisdec.c b/libavcodec/libvorbisdec.c
index 3c53b8fdaf..ebb0fcdd86 100644
--- a/libavcodec/libvorbisdec.c
+++ b/libavcodec/libvorbisdec.c
@@ -217,5 +217,5 @@  AVCodec ff_libvorbis_decoder = {
     .init           = oggvorbis_decode_init,
     .decode         = oggvorbis_decode_frame,
     .close          = oggvorbis_decode_close,
-    .capabilities   = AV_CODEC_CAP_DELAY,
+    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c
index 87cd7cb211..396310ba1e 100644
--- a/libavcodec/metasound.c
+++ b/libavcodec/metasound.c
@@ -385,7 +385,7 @@  AVCodec ff_metasound_decoder = {
     .init           = metasound_decode_init,
     .close          = ff_twinvq_decode_close,
     .decode         = ff_twinvq_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index ed25b71d2d..3b1608b29b 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -1338,7 +1338,7 @@  AVCodec ff_mlp_decoder = {
     .priv_data_size = sizeof(MLPDecodeContext),
     .init           = mlp_decode_init,
     .decode         = read_access_unit,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };
 #endif
@@ -1351,7 +1351,7 @@  AVCodec ff_truehd_decoder = {
     .priv_data_size = sizeof(MLPDecodeContext),
     .init           = mlp_decode_init,
     .decode         = read_access_unit,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };
 #endif /* CONFIG_TRUEHD_DECODER */
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index b05942bca7..b4dc9b7395 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -450,7 +450,7 @@  AVCodec ff_mpc8_decoder = {
     .init           = mpc8_decode_init,
     .decode         = mpc8_decode_frame,
     .flush          = mpc8_decode_flush,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
                                                       AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index d667d9ce79..16c2c6d9b3 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -195,7 +195,7 @@  AVCodec ff_nellymoser_decoder = {
     .init           = decode_init,
     .close          = decode_end,
     .decode         = decode_tag,
-    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_PARAM_CHANGE | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
                                                       AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 03086dea99..a08758d25d 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -737,5 +737,5 @@  AVCodec ff_opus_decoder = {
     .close           = opus_decode_close,
     .decode          = opus_decode_packet,
     .flush           = opus_decode_flush,
-    .capabilities    = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .capabilities    = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index 517d7b518c..8e6f562b52 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -307,7 +307,7 @@  AVCodec ff_pcm_bluray_decoder = {
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_PCM_BLURAY,
     .decode         = pcm_bluray_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]){
         AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE
     },
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index b4afda2fb1..4878af5a2c 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -797,6 +797,6 @@  AVCodec ff_qcelp_decoder = {
     .id             = AV_CODEC_ID_QCELP,
     .init           = qcelp_decode_init,
     .decode         = qcelp_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_data_size = sizeof(QCELPContext),
 };
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index c3e1315ef0..a6aef82243 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1882,5 +1882,5 @@  AVCodec ff_qdm2_decoder = {
     .init             = qdm2_decode_init,
     .close            = qdm2_decode_close,
     .decode           = qdm2_decode_frame,
-    .capabilities     = AV_CODEC_CAP_DR1,
+    .capabilities     = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index f4e507fa60..79a9b2578e 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@@ -784,5 +784,5 @@  AVCodec ff_qdmc_decoder = {
     .close            = qdmc_decode_close,
     .decode           = qdmc_decode_frame,
     .flush            = qdmc_flush,
-    .capabilities     = AV_CODEC_CAP_DR1,
+    .capabilities     = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index c716c32e67..40b278895f 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -134,5 +134,5 @@  AVCodec ff_ra_144_decoder = {
     .priv_data_size = sizeof(RA144Context),
     .init           = ra144_decode_init,
     .decode         = ra144_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 8df17891b1..6495026874 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -244,5 +244,5 @@  AVCodec ff_ra_288_decoder = {
     .priv_data_size = sizeof(RA288Context),
     .init           = ra288_decode_init,
     .decode         = ra288_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/sbcdec.c b/libavcodec/sbcdec.c
index 5361ee2c89..b8f01d5ff0 100644
--- a/libavcodec/sbcdec.c
+++ b/libavcodec/sbcdec.c
@@ -370,7 +370,7 @@  AVCodec ff_sbc_decoder = {
     .priv_data_size        = sizeof(SBCDecContext),
     .init                  = sbc_decode_init,
     .decode                = sbc_decode_frame,
-    .capabilities          = AV_CODEC_CAP_DR1,
+    .capabilities          = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal         = FF_CODEC_CAP_INIT_THREADSAFE,
     .channel_layouts       = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
                                                   AV_CH_LAYOUT_STEREO, 0},
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index ad045a543f..7ba9fd4a07 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -570,6 +570,6 @@  AVCodec ff_sipr_decoder = {
     .priv_data_size = sizeof(SiprContext),
     .init           = sipr_decoder_init,
     .decode         = sipr_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index a285228bbc..32e94d24f6 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -1081,7 +1081,7 @@  AVCodec ff_sonic_decoder = {
     .init           = sonic_decode_init,
     .close          = sonic_decode_close,
     .decode         = sonic_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 #endif /* CONFIG_SONIC_DECODER */
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 9fa1cb1f7f..6bf5dcc2d3 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -947,7 +947,7 @@  AVCodec ff_tak_decoder = {
     .close            = tak_decode_close,
     .decode           = tak_decode_frame,
     .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
-    .capabilities     = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+    .capabilities     = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts      = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                         AV_SAMPLE_FMT_S16P,
                                                         AV_SAMPLE_FMT_S32P,
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index e68e4fbb36..f1e159b03d 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -423,6 +423,6 @@  AVCodec ff_tta_decoder = {
     .init           = tta_decode_init,
     .close          = tta_decode_close,
     .decode         = tta_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
     .priv_class     = &tta_decoder_class,
 };
diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index c00ebb2ad5..b13f8a04cc 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -422,7 +422,7 @@  AVCodec ff_twinvq_decoder = {
     .init           = twinvq_decode_init,
     .close          = ff_twinvq_decode_close,
     .decode         = ff_twinvq_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
 };
diff --git a/libavcodec/vima.c b/libavcodec/vima.c
index b4620acf6b..2dfc2cc5c8 100644
--- a/libavcodec/vima.c
+++ b/libavcodec/vima.c
@@ -214,5 +214,5 @@  AVCodec ff_adpcm_vima_decoder = {
     .id           = AV_CODEC_ID_ADPCM_VIMA,
     .init         = decode_init,
     .decode       = decode_frame,
-    .capabilities = AV_CODEC_CAP_DR1,
+    .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index be6d1b2d21..169df591b3 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1890,7 +1890,7 @@  AVCodec ff_vorbis_decoder = {
     .close           = vorbis_decode_close,
     .decode          = vorbis_decode_frame,
     .flush           = vorbis_decode_flush,
-    .capabilities    = AV_CODEC_CAP_DR1,
+    .capabilities    = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal   = FF_CODEC_CAP_INIT_CLEANUP,
     .channel_layouts = ff_vorbis_channel_layouts,
     .sample_fmts     = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 58122c948c..f48da7d004 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1711,6 +1711,6 @@  AVCodec ff_wavpack_decoder = {
     .flush          = wavpack_decode_flush,
     .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
     .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
-                      AV_CODEC_CAP_SLICE_THREADS,
+                      AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_ALLOCATE_PROGRESS,
 };
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index bc9ed00938..958c067736 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -177,6 +177,6 @@  AVCodec ff_ws_snd1_decoder = {
     .id             = AV_CODEC_ID_WESTWOOD_SND1,
     .init           = ws_snd_decode_init,
     .decode         = ws_snd_decode_frame,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
 };