comparison aacsbr.c @ 11672:f838fa3eefee libavcodec

Enforce time border monotonicity. Thanks to Chromium.
author alexc
date Fri, 30 Apr 2010 23:32:42 +0000
parents 7f301b81b503
children ed3d232c9d31
comparison
equal deleted inserted replaced
11671:7f301b81b503 11672:f838fa3eefee
716 if (bs_pointer > ch_data->bs_num_env + 1) { 716 if (bs_pointer > ch_data->bs_num_env + 1) {
717 av_log(ac->avccontext, AV_LOG_ERROR, 717 av_log(ac->avccontext, AV_LOG_ERROR,
718 "Invalid bitstream, bs_pointer points to a middle noise border outside the time borders table: %d\n", 718 "Invalid bitstream, bs_pointer points to a middle noise border outside the time borders table: %d\n",
719 bs_pointer); 719 bs_pointer);
720 return -1; 720 return -1;
721 }
722
723 for (i = 1; i <= ch_data->bs_num_env; i++) {
724 if (ch_data->t_env[i-1] > ch_data->t_env[i]) {
725 av_log(ac->avccontext, AV_LOG_ERROR, "Non monotone time borders\n");
726 return -1;
727 }
721 } 728 }
722 729
723 ch_data->bs_num_noise = (ch_data->bs_num_env > 1) + 1; 730 ch_data->bs_num_noise = (ch_data->bs_num_env > 1) + 1;
724 731
725 ch_data->t_q[0] = ch_data->t_env[0]; 732 ch_data->t_q[0] = ch_data->t_env[0];