diff options
Diffstat (limited to 'apps/codecs/libmad/layer12.c')
-rw-r--r-- | apps/codecs/libmad/layer12.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/codecs/libmad/layer12.c b/apps/codecs/libmad/layer12.c index 3c5d0ce613..8d3b920ea6 100644 --- a/apps/codecs/libmad/layer12.c +++ b/apps/codecs/libmad/layer12.c | |||
@@ -485,7 +485,8 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
485 | for (sb = 0; sb < bound; ++sb) { | 485 | for (sb = 0; sb < bound; ++sb) { |
486 | for (ch = 0; ch < nch; ++ch) { | 486 | for (ch = 0; ch < nch; ++ch) { |
487 | if ((index = allocation[ch][sb])) { | 487 | if ((index = allocation[ch][sb])) { |
488 | index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; | 488 | int off = bitalloc_table[offsets[sb]].offset; |
489 | index = offset_table[off][index - 1]; | ||
489 | 490 | ||
490 | II_samples(&stream->ptr, &qc_table[index], samples); | 491 | II_samples(&stream->ptr, &qc_table[index], samples); |
491 | 492 | ||
@@ -503,7 +504,8 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
503 | 504 | ||
504 | for (sb = bound; sb < sblimit; ++sb) { | 505 | for (sb = bound; sb < sblimit; ++sb) { |
505 | if ((index = allocation[0][sb])) { | 506 | if ((index = allocation[0][sb])) { |
506 | index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; | 507 | int off = bitalloc_table[offsets[sb]].offset; |
508 | index = offset_table[off][index - 1]; | ||
507 | 509 | ||
508 | II_samples(&stream->ptr, &qc_table[index], samples); | 510 | II_samples(&stream->ptr, &qc_table[index], samples); |
509 | 511 | ||