[FFmpeg-cvslog] ttaenc: fix packet size

Paul B Mahol git at videolan.org
Sat Aug 10 02:09:40 CEST 2013


ffmpeg | branch: release/2.0 | Paul B Mahol <onemda at gmail.com> | Fri Aug  2 16:45:58 2013 +0000| [b79f337f8a683887f8bb436812c8bee3fd67f95e] | committer: Michael Niedermayer

ttaenc: fix packet size

Signed-off-by: Paul B Mahol <onemda at gmail.com>
(cherry picked from commit bc2187cfdb5eeb82e3caf42a81a00d1ee4c16d8e)

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

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

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

diff --git a/libavcodec/ttaenc.c b/libavcodec/ttaenc.c
index c77e0c2..55599cc 100644
--- a/libavcodec/ttaenc.c
+++ b/libavcodec/ttaenc.c
@@ -116,7 +116,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     PutBitContext pb;
     int ret, i, out_bytes, cur_chan = 0, res = 0, samples = 0;
 
-    if ((ret = ff_alloc_packet2(avctx, avpkt, frame->nb_samples * 2 * s->bps)) < 0)
+    if ((ret = ff_alloc_packet2(avctx, avpkt, frame->nb_samples * 2 * avctx->channels * s->bps)) < 0)
         return ret;
     init_put_bits(&pb, avpkt->data, avpkt->size);
 



More information about the ffmpeg-cvslog mailing list