projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32fa772
)
Error out when too many bits per frame are requested.
author
Alex Converse
<alex.converse@gmail.com>
Thu, 6 May 2010 20:35:10 +0000
(20:35 +0000)
committer
Alex Converse
<alex.converse@gmail.com>
Thu, 6 May 2010 20:35:10 +0000
(20:35 +0000)
Originally committed as revision 23036 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/aacenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/aacenc.c
b/libavcodec/aacenc.c
index
ff68f84
..
72e93a4
100644
(file)
--- a/
libavcodec/aacenc.c
+++ b/
libavcodec/aacenc.c
@@
-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);