diff options
author | Mans Rullgard <mans@mansr.com> | 2011-10-08 13:49:42 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-10-08 20:03:55 +0100 |
commit | 559c244d42be7a02c23976216b47fd63b80d6c7f (patch) | |
tree | b94fbd1f59cc9b9abf7e4291d1537d23dada5cd5 | |
parent | d12294304acd82cb219e3f66ca9cd6efb2194fa4 (diff) | |
download | ffmpeg-559c244d42be7a02c23976216b47fd63b80d6c7f.tar.gz |
dca: fix signed overflow in shift
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavcodec/dca.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dca.c b/libavcodec/dca.c index e963fe0eb4..3233f60d4a 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -909,7 +909,8 @@ static void qmf_32_subbands(DCAContext * s, int chans, for (subindex = 0; subindex < 8; subindex++) { /* Load in one sample from each subband and clear inactive subbands */ for (i = 0; i < sb_act; i++){ - uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30; + unsigned sign = (i - 1) & 2; + uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ sign << 30; AV_WN32A(&s->raXin[i], v); } |