Mercurial > libavcodec.hg
changeset 10519:06d6393bbaeb libavcodec
AAC: Rename sect_len to sect_end. It marks the last sfb of the section, not the
length of the section.
author | alexc |
---|---|
date | Wed, 11 Nov 2009 20:33:56 +0000 |
parents | d7ac0d3ddd95 |
children | 6a7840f3ed4e |
files | aac.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/aac.c Wed Nov 11 20:24:23 2009 +0000 +++ b/aac.c Wed Nov 11 20:33:56 2009 +0000 @@ -678,7 +678,7 @@ for (g = 0; g < ics->num_window_groups; g++) { int k = 0; while (k < ics->max_sfb) { - uint8_t sect_len = k; + uint8_t sect_end = k; int sect_len_incr; int sect_band_type = get_bits(gb, 4); if (sect_band_type == 12) { @@ -686,17 +686,17 @@ return -1; } while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1) - sect_len += sect_len_incr; - sect_len += sect_len_incr; - if (sect_len > ics->max_sfb) { + sect_end += sect_len_incr; + sect_end += sect_len_incr; + if (sect_end > ics->max_sfb) { av_log(ac->avccontext, AV_LOG_ERROR, "Number of bands (%d) exceeds limit (%d).\n", - sect_len, ics->max_sfb); + sect_end, ics->max_sfb); return -1; } - for (; k < sect_len; k++) { + for (; k < sect_end; k++) { band_type [idx] = sect_band_type; - band_type_run_end[idx++] = sect_len; + band_type_run_end[idx++] = sect_end; } } }