aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libfdk-aacenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-16 20:45:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-16 20:45:41 +0200
commit9db747b2a300380dd65032818155067054332dae (patch)
tree72d665b0be4eb133524bb21fb4a66a4b30dfb0cb /libavcodec/libfdk-aacenc.c
parent5dba4cbc2f3f64b188289804216a737528ced290 (diff)
parent08e087ccf7f7ef9b4e8c55b571bc779c0bc815b0 (diff)
downloadandroid_external_ffmpeg-9db747b2a300380dd65032818155067054332dae.tar.gz
android_external_ffmpeg-9db747b2a300380dd65032818155067054332dae.tar.bz2
android_external_ffmpeg-9db747b2a300380dd65032818155067054332dae.zip
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtmp: rtmp_parse_result() add case for video and audio packets to avoid undesired debug output. configure: Move the getaddrinfo function check into the network block configure: Remove an unused 'have' item mpeg: remove disabled code libfdk-aac: Check if cutoff value is valid network: Always use our version of gai_strerror on windows network: Undefine existing gai_strerror definitions network: Extend the fallback gai_strerror implementation to handle more error codes Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libfdk-aacenc.c')
-rw-r--r--libavcodec/libfdk-aacenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 74d0d806cd..c1eada0dfe 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -231,6 +231,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
}
if (avctx->cutoff > 0) {
+ if (avctx->cutoff < (avctx->sample_rate + 255) >> 8) {
+ av_log(avctx, AV_LOG_ERROR, "cutoff valid range is %d-20000\n",
+ (avctx->sample_rate + 255) >> 8);
+ goto error;
+ }
if ((err = aacEncoder_SetParam(s->handle, AACENC_BANDWIDTH,
avctx->cutoff)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to set the encoder bandwith to %d: %s\n",