[FFmpeg-cvslog] ac3dec: fix outptr increment.

Michael Niedermayer git at videolan.org
Mon Dec 17 01:47:12 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 17 01:35:14 2012 +0100| [d28dfa2d425ce5e5db38924577b3d86dcee40523] | committer: Michael Niedermayer

ac3dec: fix outptr increment.

Fixes decoding regression

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d28dfa2d425ce5e5db38924577b3d86dcee40523
---

 libavcodec/ac3dec.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 0bc1ada..4ca735f 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1402,9 +1402,8 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data,
                 memcpy(((float*)s->frame.data[ch]) + AC3_BLOCK_SIZE*blk, output[ch], 1024);
         for (ch = 0; ch < s->out_channels; ch++) {
             output[ch] = s->outptr[channel_map[ch]];
-        }
-        for (ch = 0; ch < s->channels; ch++) {
-            s->outptr[ch] += AC3_BLOCK_SIZE;
+            if (!ch || channel_map[ch])
+                s->outptr[channel_map[ch]] += AC3_BLOCK_SIZE;
         }
     }
 



More information about the ffmpeg-cvslog mailing list