aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-25 18:46:53 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2013-10-28 08:33:21 -0400
commit6c82c87dbbc0582658968eae46cfebeea90a9c5e (patch)
tree6a2dcf7244dfca8ba24c520a3dfa7eae1d037964
parenta1c5cc429d99216406170eac7e8352860076d3e8 (diff)
downloadffmpeg-6c82c87dbbc0582658968eae46cfebeea90a9c5e.tar.gz
ac3dec: fix outptr increment.
Fixes corrupt data errors when downmixing in the AC-3 decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com> CC:libav-stable@libav.org
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index d664325a29..3edb3aff83 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1400,7 +1400,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
memcpy(s->outptr[channel_map[ch]], output[ch], sizeof(**output) * AC3_BLOCK_SIZE);
for (ch = 0; ch < s->out_channels; ch++)
output[ch] = s->outptr[channel_map[ch]];
- for (ch = 0; ch < s->channels; ch++)
+ for (ch = 0; ch < s->out_channels; ch++)
s->outptr[ch] += AC3_BLOCK_SIZE;
}