Browse Source

Error out when too many bits per frame are requested.

Originally committed as revision 23036 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Alex Converse 15 years ago
parent
commit
217b44ddc3
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/aacenc.c

+ 4
- 0
libavcodec/aacenc.c View File

@@ -174,6 +174,10 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "Unsupported profile %d\n", avctx->profile);
return -1;
}
if (1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "Too many bits per frame requested\n");
return -1;
}
s->samplerate_index = i;

dsputil_init(&s->dsp, avctx);


Loading…
Cancel
Save