mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-02 05:56:46 +08:00
AAC: Rename sect_len to sect_end. It marks the last sfb of the section, not the
length of the section. Originally committed as revision 20513 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -678,7 +678,7 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120],
|
|||||||
for (g = 0; g < ics->num_window_groups; g++) {
|
for (g = 0; g < ics->num_window_groups; g++) {
|
||||||
int k = 0;
|
int k = 0;
|
||||||
while (k < ics->max_sfb) {
|
while (k < ics->max_sfb) {
|
||||||
uint8_t sect_len = k;
|
uint8_t sect_end = k;
|
||||||
int sect_len_incr;
|
int sect_len_incr;
|
||||||
int sect_band_type = get_bits(gb, 4);
|
int sect_band_type = get_bits(gb, 4);
|
||||||
if (sect_band_type == 12) {
|
if (sect_band_type == 12) {
|
||||||
@ -686,17 +686,17 @@ static int decode_band_types(AACContext *ac, enum BandType band_type[120],
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1)
|
while ((sect_len_incr = get_bits(gb, bits)) == (1 << bits) - 1)
|
||||||
sect_len += sect_len_incr;
|
sect_end += sect_len_incr;
|
||||||
sect_len += sect_len_incr;
|
sect_end += sect_len_incr;
|
||||||
if (sect_len > ics->max_sfb) {
|
if (sect_end > ics->max_sfb) {
|
||||||
av_log(ac->avccontext, AV_LOG_ERROR,
|
av_log(ac->avccontext, AV_LOG_ERROR,
|
||||||
"Number of bands (%d) exceeds limit (%d).\n",
|
"Number of bands (%d) exceeds limit (%d).\n",
|
||||||
sect_len, ics->max_sfb);
|
sect_end, ics->max_sfb);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
for (; k < sect_len; k++) {
|
for (; k < sect_end; k++) {
|
||||||
band_type [idx] = sect_band_type;
|
band_type [idx] = sect_band_type;
|
||||||
band_type_run_end[idx++] = sect_len;
|
band_type_run_end[idx++] = sect_end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user