ttaenc: fix packet size

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/37/head
Paul B Mahol 12 years ago
parent 2b9590ebab
commit bc2187cfdb
  1. 2
      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);

Loading…
Cancel
Save