aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-02 21:29:48 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-02 21:29:48 +0100
commit61d0a6dd9554ecd705518d38d531363cdabab7d3 (patch)
tree9119cf539e023a3510d8dbcb72c17d8122b46278
parent9adc999d2a927123d4b37a2a0c6eeb0d37c12cef (diff)
parent7464e98f74c03d3efa0cdc8d7abad06e4c3c277a (diff)
downloadffmpeg-61d0a6dd9554ecd705518d38d531363cdabab7d3.tar.gz
Merge commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a'
* commit '7464e98f74c03d3efa0cdc8d7abad06e4c3c277a': aac: Simplify decode_mid_side_stereo Conflicts: libavcodec/aacdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aacdec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index f74cf156b5..db2a9b676e 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -1516,13 +1516,12 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb,
int ms_present)
{
int idx;
+ int max_idx = cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb;
if (ms_present == 1) {
- for (idx = 0;
- idx < cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb;
- idx++)
+ for (idx = 0; idx < max_idx; idx++)
cpe->ms_mask[idx] = get_bits1(gb);
} else if (ms_present == 2) {
- memset(cpe->ms_mask, 1, sizeof(cpe->ms_mask[0]) * cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb);
+ memset(cpe->ms_mask, 1, max_idx * sizeof(cpe->ms_mask[0]));
}
}