avcodec/sbcdec: Don't set encoder-only fields

ch_layouts, sample_fmts and supported_samplerates
are of no use for a decoder, so don't set them.
In this case this fixes an inconsistency:
ch_layouts contained mono and stereo, yet lateron
the AVCodecContext's ch_layout is always populated
with an AV_CHANNEL_ORDER_UNSPEC layout.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-02-06 22:48:49 +01:00
parent f648dd0e8a
commit 028d9d3997

View File

@@ -371,7 +371,4 @@ const FFCodec ff_sbc_decoder = {
.init = sbc_decode_init,
FF_CODEC_DECODE_CB(sbc_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
CODEC_CH_LAYOUTS(AV_CHANNEL_LAYOUT_MONO, AV_CHANNEL_LAYOUT_STEREO),
CODEC_SAMPLEFMTS(AV_SAMPLE_FMT_S16P),
CODEC_SAMPLERATES(16000, 32000, 44100, 48000),
};