aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-29 20:58:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-16 00:47:18 +0100
commita2bea0df0e4a9d242b2d577d407e1a9d504ec02e (patch)
tree3f6015c37a264f114c9ddf1f78a04932300f7b30
parent483b2016bb70c1170383d8710433bed144e5706f (diff)
downloadffmpeg-a2bea0df0e4a9d242b2d577d407e1a9d504ec02e.tar.gz
aacps: correct opdipd code to match spec
This fixes out of array reads Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 66e9716a36105f69b9f076b0fec3ec2551c7e3b7) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aacps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index b82001e967..9abc296cc7 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -823,7 +823,8 @@ static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2
h12 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][1];
h21 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][2];
h22 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][3];
- if (!PS_BASELINE && ps->enable_ipdopd && b < ps->nr_ipdopd_par) {
+
+ if (!PS_BASELINE && ps->enable_ipdopd && 2*b <= NR_PAR_BANDS[is34]) {
//The spec say says to only run this smoother when enable_ipdopd
//is set but the reference decoder appears to run it constantly
float h11i, h12i, h21i, h22i;