aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_template.c
diff options
context:
space:
mode:
authorNedeljko Babic <nedeljko.babic@imgtec.com>2015-07-29 16:46:18 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-29 16:53:29 +0200
commit902bfa5b22083f4959de775e2f8f278785d6ff02 (patch)
tree9add4ed0663ead93a5e3fcb98ea58d1e199d7157 /libavcodec/aacdec_template.c
parentd64ba25a4dd7951e6ac63ecad55a1dfe665d15b0 (diff)
downloadffmpeg-902bfa5b22083f4959de775e2f8f278785d6ff02.tar.gz
avcodec/aacdec_fixed: Fix preparation for resampler
2nd channel makes sense only for CPE type. Skip 2nd channel in preparation for resampler (in spectral_to _sample()) depending on block type. Fixes fate failure with clang ftrapv. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacdec_template.c')
-rw-r--r--libavcodec/aacdec_template.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 13653a873b..2f270bcb19 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2750,7 +2750,8 @@ static void spectral_to_sample(AACContext *ac, int samples)
/* preparation for resampler */
for(j = 0; j<samples; j++){
che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000;
- che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;
+ if(type == TYPE_CPE)
+ che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;
}
}
#endif /* USE_FIXED */