Skip to content
Snippets Groups Projects
Commit bc2187cf authored by Paul B Mahol's avatar Paul B Mahol
Browse files

ttaenc: fix packet size


Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 2b9590eb
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ...@@ -116,7 +116,7 @@ static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
PutBitContext pb; PutBitContext pb;
int ret, i, out_bytes, cur_chan = 0, res = 0, samples = 0; 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; return ret;
init_put_bits(&pb, avpkt->data, avpkt->size); init_put_bits(&pb, avpkt->data, avpkt->size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment