[FFmpeg-cvslog] ac3dec: Increment channel pointers only once per channel
Martin Storsjö
git at videolan.org
Tue Aug 27 18:02:17 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Thu Jul 11 16:30:18 2013 +0300| [96f9b184972a6d0bcb954fd6a60f7dea69765631] | committer: Luca Barbato
ac3dec: Increment channel pointers only once per channel
If the channel mapping map multiple output channels to one
input channel, we should only increment the actual pointer once.
Cc: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 68e57cde68f3da4c557ca15491fda74d1ea6321e)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96f9b184972a6d0bcb954fd6a60f7dea69765631
---
libavcodec/ac3dec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 0d1ba89..6fb7b0b 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1393,10 +1393,10 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
if (err)
for (ch = 0; ch < s->out_channels; ch++)
memcpy(s->outptr[channel_map[ch]], output[ch], 1024);
- for (ch = 0; ch < s->out_channels; ch++) {
+ for (ch = 0; ch < s->out_channels; ch++)
output[ch] = s->outptr[channel_map[ch]];
- s->outptr[channel_map[ch]] += AC3_BLOCK_SIZE;
- }
+ for (ch = 0; ch < s->channels; ch++)
+ s->outptr[ch] += AC3_BLOCK_SIZE;
}
/* keep last block for error concealment in next frame */
More information about the ffmpeg-cvslog
mailing list