This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit ca5504fb5ca76a380c13157ef294741ecadad871 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Sun Nov 23 00:26:07 2025 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Thu Jan 29 14:08:15 2026 +0100 avcodec/liblc3dec: Simplify sample fmt selection Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/liblc3dec.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/libavcodec/liblc3dec.c b/libavcodec/liblc3dec.c index a0989c88b0..953445ecfa 100644 --- a/libavcodec/liblc3dec.c +++ b/libavcodec/liblc3dec.c @@ -43,14 +43,6 @@ static av_cold int liblc3_decode_init(AVCodecContext *avctx) int ep_mode; unsigned decoder_size; - static const struct { - enum AVSampleFormat av_format; - enum lc3_pcm_format lc3_format; - } format_map[] = { - { AV_SAMPLE_FMT_FLT, LC3_PCM_FORMAT_FLOAT }, - { AV_SAMPLE_FMT_FLTP, LC3_PCM_FORMAT_FLOAT }, - }; - if (avctx->extradata_size < 6) return AVERROR_INVALIDDATA; if (channels < 0 || channels > DECODER_MAX_CHANNELS) { @@ -90,15 +82,8 @@ static av_cold int liblc3_decode_init(AVCodecContext *avctx) (char *)liblc3->decoder_mem + ch * decoder_size); } - avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - if (avctx->request_sample_fmt != AV_SAMPLE_FMT_NONE) { - for (int i = 0; i < FF_ARRAY_ELEMS(format_map); i++) { - if (format_map[i].av_format == avctx->request_sample_fmt) { - avctx->sample_fmt = avctx->request_sample_fmt; - break; - } - } - } + avctx->sample_fmt = avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT ? + AV_SAMPLE_FMT_FLT : AV_SAMPLE_FMT_FLTP; avctx->delay = lc3_hr_delay_samples( liblc3->hr_mode, liblc3->frame_us, liblc3->srate_hz); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
