diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-04-30 23:32:42 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-04-30 23:32:42 +0000 |
commit | 2d23fecd5dfbf544d8ddc0cada2e09d4ddce2a92 (patch) | |
tree | e4926511f7ebbb72cd6e46d11e9a6e8d766b671b /libavcodec | |
parent | a91d82b5cc7d828ea9779aae1595f60e7e257d29 (diff) | |
download | ffmpeg-2d23fecd5dfbf544d8ddc0cada2e09d4ddce2a92.tar.gz |
Enforce time border monotonicity.
Thanks to Chromium.
Originally committed as revision 23000 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacsbr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index bc6cb003cb..130e3ed121 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -720,6 +720,13 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr, return -1; } + for (i = 1; i <= ch_data->bs_num_env; i++) { + if (ch_data->t_env[i-1] > ch_data->t_env[i]) { + av_log(ac->avccontext, AV_LOG_ERROR, "Non monotone time borders\n"); + return -1; + } + } + ch_data->bs_num_noise = (ch_data->bs_num_env > 1) + 1; ch_data->t_q[0] = ch_data->t_env[0]; |