diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-07 14:30:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-04-11 12:44:27 +0200 |
commit | 27a830c1d827b1bc61216000ec86eba0ca82e536 (patch) | |
tree | c0e5bd19250abaebc63e4abc7d98fb178dc8b581 /libavcodec | |
parent | e878ec7eb23f3cd88503df1f18277e93ceadf773 (diff) | |
download | ffmpeg-27a830c1d827b1bc61216000ec86eba0ca82e536.tar.gz |
avcodec/ac3enc: Remove always-false sample rate check
encode_preinit_audio() already checks that the sample rate
is among AVCodec.supported_samplerates.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ac3enc.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 272d2481d9..32aaf89ec1 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -2246,10 +2246,6 @@ static av_cold int validate_options(AC3EncodeContext *s) if ((ff_ac3_sample_rate_tab[i % 3] >> (i / 3)) == avctx->sample_rate) break; } - if (i > max_sr) { - av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n"); - return AVERROR(EINVAL); - } s->sample_rate = avctx->sample_rate; s->bit_alloc.sr_shift = i / 3; s->bit_alloc.sr_code = i % 3; |