1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

libfdk-aacenc: Actually check for upper bounds of cutoff

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2013-02-09 14:03:02 -05:00
parent ab8f1a6989
commit 375ef6528c

View File

@ -250,7 +250,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
} }
if (avctx->cutoff > 0) { 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", av_log(avctx, AV_LOG_ERROR, "cutoff valid range is %d-20000\n",
(avctx->sample_rate + 255) >> 8); (avctx->sample_rate + 255) >> 8);
goto error; goto error;