Commit c177f2ec authored by Derek Buitenhuis's avatar Derek Buitenhuis

libfdk-aacenc: Actually check for upper bounds of cutoff

Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 8160864b
......@@ -250,7 +250,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
}
if (avctx->cutoff > 0) {
if (avctx->cutoff < (avctx->sample_rate + 255) >> 8) {
if (avctx->cutoff < (avctx->sample_rate + 255) >> 8 || avctx->cutoff > 20000) {
av_log(avctx, AV_LOG_ERROR, "cutoff valid range is %d-20000\n",
(avctx->sample_rate + 255) >> 8);
goto error;
......
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