Commit 704c9802 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacenc: Fix sample rate check

Fixes out of array read
Fixes CID1257803, CID1257797, CID1257789, CID1257786
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a6baef65
......@@ -740,7 +740,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
s->channels = avctx->channels;
ERROR_IF(i == 16,
ERROR_IF(i >= 12,
"Unsupported sample rate %d\n", avctx->sample_rate);
ERROR_IF(s->channels > AAC_MAX_CHANNELS,
"Unsupported number of channels: %d\n", s->channels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment