[FFmpeg-cvslog] sonicdec: fix frame size

Michael Niedermayer git at videolan.org
Thu Mar 21 16:13:25 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 21 15:46:16 2013 +0100| [6ec037c5a9e1eac10d0683486801dfdfe9db5056] | committer: Michael Niedermayer

sonicdec: fix frame size

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

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

 libavcodec/sonic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index ae7ca4c..a7e0a00 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -880,7 +880,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
 
     if (buf_size == 0) return 0;
 
-    s->frame.nb_samples = s->frame_size;
+    s->frame.nb_samples = s->frame_size / avctx->channels;
     if ((ret = ff_get_buffer(avctx, &s->frame, 0)) < 0)
         return ret;
     samples = (int16_t *)s->frame.data[0];



More information about the ffmpeg-cvslog mailing list