[FFmpeg-cvslog] ttaenc: fix packet size

Paul B Mahol git at videolan.org
Fri Aug 2 18:49:46 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Aug  2 16:45:58 2013 +0000| [bc2187cfdb5eeb82e3caf42a81a00d1ee4c16d8e] | committer: Paul B Mahol

ttaenc: fix packet size

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 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